Results 1 to 4 of 4

Thread: Program does not contain a static 'Main' method suitable for an entry point

  1. #1

    Thread Starter
    Member DarthmooN's Avatar
    Join Date
    Mar 2010
    Location
    Bulgaria for a while
    Posts
    47

    Program does not contain a static 'Main' method suitable for an entry point

    I have Dev Cpp based project and just moving the sources to VS 2008.
    I've been creating a "C#" project "Console App" and just adding the sources then it wont compile because of that error:
    C:\blah\blah\blah.exe does not contain a static 'Main' method suitable for an entry point.
    Thanks.

    I guess there must be something wrong with that code
    Code:
    #include "main.h"
    
    void init_memory();
    void main_loop();
    
    int main(int argc, char *argv[])
    {
    some code
    }
    Im sorry if my post looks stupid, i still learning the programing stuff and i also apologize if it doesn't contain the right information you need for more competent help, thanks

  2. #2

    Thread Starter
    Member DarthmooN's Avatar
    Join Date
    Mar 2010
    Location
    Bulgaria for a while
    Posts
    47

    Re: Program does not contain a static 'Main' method suitable for an entry point

    ~ bump
    Im sorry if my post looks stupid, i still learning the programing stuff and i also apologize if it doesn't contain the right information you need for more competent help, thanks

  3. #3
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Program does not contain a static 'Main' method suitable for an entry point

    Do you have another main() method defined in the header file ?

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  4. #4
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Program does not contain a static 'Main' method suitable for an entry point

    Quote Originally Posted by DarthmooN View Post
    I have Dev Cpp based project and just moving the sources to VS 2008.
    I've been creating a "C#" project "Console App" and just adding the sources then it wont compile because of that error:
    C:\blah\blah\blah.exe does not contain a static 'Main' method suitable for an entry point.
    Thanks.

    I guess there must be something wrong with that code
    Code:
    #include "main.h"
    
    void init_memory();
    void main_loop();
    
    int main(int argc, char *argv[])
    {
    some code
    }
    You are compiling that code as c#?
    Delete it. They just clutter threads anyway.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width