|
这是我第一次编win32程序,可是就卡了,不知道是不是什么东西没装还是什么其他原因
原程序:
// DEMO2_2.CPP - a simple message box
#define WIN32_LEAN_AND_MEAN
#include <windows.h> // the main windows headers
#include <windowsx.h> // a lot of cool macros
// main entry point for all windows programs
int WINAPI WinMain(HINSTANCE hinstance,
HINSTANCE hprevinstance,
LPSTR lpcmdline,
int ncmdshow)
{
// call message box api with NULL for parent window handle
MessageBox(NULL, "THERE CAN BE ONLY ONE!!!",
"MY FIRST WINDOWS PROGRAM",
MB_OK | MB_ICONEXCLAMATION);
// exit program
return(0);
} // end WinMain
编译后的提示:
--------------------Configuration: Cpp1 - Win32 Debug--------------------
Compiling...
Cpp1.cpp
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Cpp1.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.
Cpp1.exe - 1 error(s), 0 warning(s)
为什么呀,帮帮我呀,
|
|