win32程序编译通过,但是不能运行解决办法

win32程序编译通过,但是不能运行
#include<windows.h>
int WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
PSTR szCmdLine,
int iCmdShow)
{
MessageBox(NULL,TEXT("Hello Windows 98"),TEXT("Hello!"),MB_OK);
return 0;
}

运行显示错误提示为
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/win32.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.
Creating browse info file...

win32.exe - 1 error(s), 0 warning(s)

------解决方案--------------------
你建的是控制台程序,要用Win32 Application才行,否则链接器默认会去找main()函数做为程序入口。
链接器有个选项:
/subsystem:console 控制台程序,入口函数为main();
/subsystem:windows Win32应用程序,入口函数为WinMain();