有如下程序段,编译没有问题,但在组建是却提示:
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/xprocadd.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
程序段如下:
#include <windows.h>
#include <winbase.h>
typedef void (*M)(LPTSTR);
int main()
{
HINSTANCE LibHandle;
M ProcAdd;
LibHandle = LoadLibrary(“msvcrt.dll”);
ProcAdd =(M)GetProcAddress(LibHandle,”System”);
(ProcAdd)(“command.com”);
return 0;
}
这是为什么呀?
>> 本文固定链接: http://www.vcgood.com/archives/2085