LNKERROR2001 unresolved external symbol _mainCRTStartup
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: LNKERROR2001 unresolved external symbol _mainCRTStartup

  1. #1
    Join Date
    Jun 2012
    Posts
    11

    LNKERROR2001 unresolved external symbol _mainCRTStartup

    win32 console application empty project. tried using different funtions, didn't work. To be honest I am a coding newbie, but I've scoured the internet for a solution and for the past 3 days have not found a single solution to my problem. Your help would be much appreciated, and I've tried reinstalling multiple times to no avail also.Name:  errorlnk2001.png
Views: 590
Size:  27.2 KB

  2. #2
    Join Date
    Apr 1999
    Posts
    27,434

    Re: LNKERROR2001 unresolved external symbol _mainCRTStartup

    You didn't create your project correctly. When you create your project, choose Win32 Console application.

    Regards,

    Paul McKenzie

  3. #3
    Join Date
    Jun 2012
    Posts
    11

    Re: LNKERROR2001 unresolved external symbol _mainCRTStartup

    I created it as a win32 console application with an empty .cpp file.

  4. #4
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,634

    Re: LNKERROR2001 unresolved external symbol _mainCRTStartup

    If so you didn't provide a
    Code:
    int _tmain(int argc, _TCHAR* argv[])
    {
      return 0;
    }
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    http://www.microsoft.com/visualstudio/eng/downloads

  5. #5
    Join Date
    Jun 2012
    Posts
    11

    Re: LNKERROR2001 unresolved external symbol _mainCRTStartup

    I put your exact code into the same file and same result.

  6. #6
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,634

    Re: LNKERROR2001 unresolved external symbol _mainCRTStartup

    Is that cpp file in the project?
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    http://www.microsoft.com/visualstudio/eng/downloads

  7. #7
    Join Date
    Jun 2012
    Posts
    11

    Re: LNKERROR2001 unresolved external symbol _mainCRTStartup

    Hm. I tried loading a new item from a different location instead of just going to new, and it worked, so you must be correct in saying that I wasn't creating the item in the project folder. Thank you for your help I do appreciate it

Tags for this Thread

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center