为什么一个最基本的Window程序都有错误?
Meuck 2003-08-30 08:43:03 下面是代码:
///////////////////////////////////
#include<windows.h>
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPreInstance,
LPSTR lpCmdLine,int nCmdShow)
{
//MessageBox(GetActiveWindow(),"hheha","ldsfo",MB_OK);
return 1;
}
////////////////////////////////
输出错误:
Compiling...
main.cpp
Linking...
LIBC.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Release/main.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
main.exe - 2 error(s), 0 warning(s)
/////////////////////////////////
好象以前也试过,不过重装Window之后就消失了。