大神,救救我啊
# include <windows.h>
int WINAPI WinMain( //此处改成main就好
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // command line
int nCmdShow // show state
)
{
MessageBox(NULL,"ni hao","sulsan",0);
return 0;
}
这么简单的入门代码,连接出错,将int WINAPI WinMain改成 main就能够连接,但运行时多出了一个控制台窗口,连接错误如下
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/549.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.
549.exe - 1 error(s), 0 warning(s)
老是说main出错,郁闷啦
谢谢大神求救,vc6.0环境