一个很简单的程序,只有三行,如下.出现连接错误:unresolved external symbol _main
#include <windows.h>int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
return 0;
}--------------------Configuration: test - Win32 Debug--------------------
Compiling...
test.cpp
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/test.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.test.exe - 2 error(s), 0 warning(s)
#include <windows.h>int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
return 0;
}--------------------Configuration: test - Win32 Debug--------------------
Compiling...
test.cpp
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/test.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.test.exe - 2 error(s), 0 warning(s)
_WINDOW的入口为WinMain()