问题
Using Visual C++ 2010 Express an as normal user, I created a Win32 Project with a main.cpp file containing: include
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int)
{
return 0;
}
At the linking stage, as a normal user, I get: MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol main referenced in function __tmainCRTStartup
However, if I run the same project as administrator, it builds (links) fine and I get the required executable. Any ideas as to why this happens?
来源:https://stackoverflow.com/questions/7939541/visual-c-2010-express-for-win32-project-linking-only-works-as-administrator