主题:我刚开始读windows程序设计,遇到些麻烦,向大家求助
我刚开始读windows程序设计,遇到些麻烦,向大家求助,帮帮我
使用VC++6 新建.CPP文件,如下:
/*--------------------------------------------------------------
HelloMsg.c -- Displays "Hello, Windows 98!" in a message box
(c) Charles Petzold, 1998
--------------------------------------------------------------*/
#include <windows.h>
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,PSTR szCmdLine, int iCmdShow)
{
MessageBox (NULL, TEXT ("Hello, Windows 98!"), TEXT ("HelloMsg"), 0) ;
return 0 ;
}
compile后无误但在Build后提示错误,如下:
--------------------Configuration: aa - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/aa.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
aa.exe - 2 error(s), 0 warning(s)
请问如何处理?????
使用VC++6 新建.CPP文件,如下:
/*--------------------------------------------------------------
HelloMsg.c -- Displays "Hello, Windows 98!" in a message box
(c) Charles Petzold, 1998
--------------------------------------------------------------*/
#include <windows.h>
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,PSTR szCmdLine, int iCmdShow)
{
MessageBox (NULL, TEXT ("Hello, Windows 98!"), TEXT ("HelloMsg"), 0) ;
return 0 ;
}
compile后无误但在Build后提示错误,如下:
--------------------Configuration: aa - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/aa.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
aa.exe - 2 error(s), 0 warning(s)
请问如何处理?????