致命错误 LNK1120:1 个未解析的外部
这是程序:
#include <windows.h>
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
MessageBox (NULL, TEXT ("Hello, Windows!"), TEXT ("HelloMsg"), 0) ;
return 0 ;
}
我无法理解该错误。请帮助纠正它。
**ERROR** `fatal error LNK1120: 1 unresolved externals
This is the program :
#include <windows.h>
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
MessageBox (NULL, TEXT ("Hello, Windows!"), TEXT ("HelloMsg"), 0) ;
return 0 ;
}
I can't understand the error.Please help in correcting it.
**ERROR** `fatal error LNK1120: 1 unresolved externals
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为您可能正在开发一个控制台项目并尝试制作一个 Windows 应用程序!file->new中选择一个新的win32项目,然后重新编写该代码。
如果是这样,请从
您将得到以下输出:
I think you might be working on a
console project
and trying to make awindows application
!If it is so,select a new win32 project from
file->new
and then re-write that code.You will have this as output:
将 user32.lib 添加到链接库列表中。
马丁
Add user32.lib to your link libraries list.
Martyn
我认为它们不包含 VS Express 安装的 Windows SDK 部分。
的精简版
VS Express = Commercial VS Downloader
http://www.microsoft.com/download /en/details.aspx?displaylang=en%29&id=3138
ISO
http://www.microsoft.com/download/en/details.aspx ?id=18950
我推荐 ISO,这是保留备份副本的好方法。
I don't think they include the Windows SDK part of the VS Express Installation.
VS Express = stripped down version of the Commercial VS
Downloader
http://www.microsoft.com/download/en/details.aspx?displaylang=en%29&id=3138
ISO
http://www.microsoft.com/download/en/details.aspx?id=18950
I recommend the ISO it's a good way of keeping a backup copy around.