I. Problem Description
Msvcrtd. Lib (crtexew. OBJ): Error lnk2019: external symbols that cannot be parsed_ Winmain @ 16, which is referenced in the ___ tmaincrtstartup Function
Debug \ jk.exe: Fatal error lnk1120: 1 external command that cannot be parsed
Error lnk2001: unresolved external symbol_ Winmain @ 16
Debug/main.exe: Fatal error lnk 1120:1 unresolved externals
Error executing link.exe;
Ii. causes and solutions
The real cause of this problem is that the appropriate program entry function cannot be found during the C language runtime,
In general, if it is a Windows program, winmain is the entry function. In vs2010, create a project as a "Win32 project"
If it is a DOS console program, the main function is the portal function. In vs2010, create a project as "Win32 console application"
If the entry function is improperly specified, it is obvious that the function cannot be found during the C language runtime, and an error will be reported.
Modify settings to meet your needs
If you need a Windows program:
1. Select project> properties from the menu to bring up the property pages window.
2. select Configuration properties-> C/C ++-> Preprocessor from the left-side Navigation Pane, delete _ console from the Preprocessor definitions item on the right-side bar, and add _ windows.
3. Select Configuration Properties> linker> system from the left-side Navigation Pane, and change the item corresponding to subsystem in the right-side Navigation Pane to Windows (/subsystem: Windows)
If you need a console program:
1. Select project> properties from the menu to bring up the property pages window.
2. select Configuration Properties> C/C ++> Preprocessor from the left-side Navigation Pane, delete _ WINDOWS from the Preprocessor definitions option on the right-side bar, and add _ console.
3. Select Configuration Properties> linker> system from the left-side Navigation Pane, and change the item corresponding to subsystem in the right-side Navigation Pane to console (/subsystem: Console)