One, the problem description
MSVCRTD.lib (crtexew.obj): Error LNK2019: unresolved external symbol [email protected], this symbol is referenced in function ___tmaincrtstartup
Debug\jk.exe:fatal error Lnk1120:1 an unresolved external command
Error lnk2001:unresolved external symbol [email protected]
Debug/main.exe:fatal error LNK 1120:1 unresolved externals
Error executing link.exe;
Second, causes and solutions
The real reason for this problem is that the C language runtime cannot find the proper program entry function.
In general, if it is a Windows program, then WinMain is the entry function, and the new project in VS2008 is "Win32 Project"
If it is a DOS console program, then main is the entry function, and a new project in VS2008 is "Win32 Console Application"
If the entry function is not properly specified, it is clear that the C language runtime cannot find a mate function and it will report an error.
Modify settings to suit your needs
If you are a Windows program:
1. Select Project->properties in the menu, pop up the property Pages window
2. In the left column, select: Configuration properties->c/c++->preprocessor, and then delete _console in the corresponding entry in the preprocessor definitions in the right column, Add _windows.
3. In the left column, select: Configuration properties->linker->system, and then change the SUBSYSTEM corresponding item in the right column to WINDOWS (/subsystem:windows)
If it is a console program:
1. Select Project->properties in the menu, pop up the property Pages window
2. In the left column, select: Configuration properties->c/c++->preprocessor, and then delete _windows in the corresponding entry in the preprocessor definitions in the right column, Add _console.
3. In the left column, select: Configuration properties->linker->system, then change the SUBSYSTEM corresponding item in the right column to CONSOLE (/subsystem:console)
Error LNK2019: Cannot parse the external symbol [email protected], the symbol in the function ... Use