#define WIN32_LEAN_AND_MEAN#include <windows.h>
#include <windowsx.h>int WINAPI WinMain(HINSTANCE hinstance,
HINSTANCE hprevinstance,
LPSTR lpcmdline,
int ncmdshow)
{
MessageBox(NULL,"THERE CAN BE ONLY ONE!!!",
"MY FIRST WINDOWS PROGRAM",
MB_OK|MB_ICONEXCLAMATION);
return (0);
}
--------------LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/new.exe : fatal error LNK1120: 1 unresolved externals编译没问题,连接怎么还有fatal error捏?
#include <windowsx.h>int WINAPI WinMain(HINSTANCE hinstance,
HINSTANCE hprevinstance,
LPSTR lpcmdline,
int ncmdshow)
{
MessageBox(NULL,"THERE CAN BE ONLY ONE!!!",
"MY FIRST WINDOWS PROGRAM",
MB_OK|MB_ICONEXCLAMATION);
return (0);
}
--------------LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/new.exe : fatal error LNK1120: 1 unresolved externals编译没问题,连接怎么还有fatal error捏?
你建了一个console的工程啊
建一个win32的工程吧
你建的是CONSOLE
project-》settings-》选择not using mfc