先生,我编写了一个简单的程序来在 Visual c++ 2008 中显示一个消息框,但问题是当我运行此代码时,当我按是时,一个对话框显示“你的项目已过时,你想构建它”显示错误,这是什么问题???代码在这里
#include <Windows.h> /* The standard "windows.h" inclusion */
int WINAPI WinMain( HINSTANCE hInstance, /* A handle to the current instance of the application. */
HINSTANCE hPrevInstance, /* A handle to the previous instance of the application. */
LPSTR lpCmdLine, /* The command line for the application, excluding the program name. */
int nCmdShow) /* Controls how the window is to be shown. */
{
/* Call to the MessageBox function */
MessageBox(NULL, "Hello, Windows API!", "Hello", MB_OK);
/* WinMain returns 0 if we exit before we enter message loop, more on that to come */
return 0;
}
每当我在visuall c ++ 2008中运行它时,它说项目已过期,你想构建所以我点击是但它不能在底部说
1>链接... 1>MSVCRTD.lib(crtexe.obj):错误 LNK2001:无法解析的外部符号 _main 1>C:\Documents and Settings** \My Documents\Visual Studio 2008\Projects\msg\Debug\msg。 exe : 致命错误 LNK1120: 1 unresolved externals 1>Build log was saved at "file://c:\Documents and Settings* * \My Documents\Visual Studio 2008\Projects\msg\msg\Debug\BuildLog.htm" 1 >Wrath Lands - 2 个错误,0 个警告 ========== 构建:0 个成功,1 个失败,0 个最新,0 个跳过 ======== ==