c++ - fatal error LNK1120 : 1 unresolved externals

标签 c++ windows visual-c++ graphics

<分区>

这是程序:

#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

最佳答案

我认为您可能正在开发一个控制台项目,并试图制作一个windows 应用程序! 如果是这样,从 file->new 中选择一个新的 win32 项目,然后重新编写该代码。 您将得到以下输出:

enter image description here

关于c++ - fatal error LNK1120 : 1 unresolved externals,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6515271/

相关文章:

c++ - 类类名(值);和类类名=值;显式构造函数时的区别

c++ - boost-python:如何提供自定义构造函数包装函数?

windows - NSIS 隐藏它的窗口?

python - 在 Python 中获取其他正在运行的进程窗口大小

c# - 如何在托管 C++ 中正确实现带有事件的 C# 接口(interface)

c++ - 高分辨率定时器与低分辨率定时器

c++ - Cmake import -lpthread 等

windows - Microsoft 批处理文件未将参数传递给子例程

c++ - 检测 windows jpeg 图标

c++ - 在 VC++ 中,数组的长度不会在运行时得到验证吗?