c++ - fatal error LNK1120 : 4 unresolved externals

标签 c++ visual-studio-2013

<分区>

我是游戏开发的新手,我对 Goldsrc(Valve 的早期引擎)很感兴趣。 我找到了 Counter-Strike 1.6 (Modified Goldsrc) 的源代码并尝试用 VS2013 编译它。

几乎没有出现错误 - http://imagizer.imageshack.us/v2/800x600q90/809/qdfh.png 修改后的 Goldsrc - http://www.mediafire.com/download/798fcj9tb771r6z/CSSDK-master.rar

最佳答案

通常,当您调用未定义的内容时会出现此错误。 (例如,您调用的函数在您在源代码中 #include 的文件中没有主体)

An undefined external symbol (symbol) was found in function. To resolve this error, provide a definition for symbol or remove the code that references it

正如微软网站上所说。您可以按照他们的提示找到解决此错误的方法。

http://msdn.microsoft.com/en-us/library/799kze2z.aspx

编译 DLL 时,符号定义位于 Visual Studio 提供的 .lib 文件中。基本上,您必须包含那个 .lib。文件在你的可执行文件中。

在“解决方案管理器”对话框中右键单击您的项目,然后单击Properties。您必须转到 Common Properties,然后单击 Add New Reference

enter image description here

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

相关文章:

vb.net - 如何在 Visual Studio 2013 上进入设计 View ?

c++ - 缺少默认构造函数 - 但我没有调用它?

c++ - 使用变量声明对象的名称

带有 Visual Studio 2013 Express 的 QT

c# - 如何在浏览代码时显示<returns>内容?

c++ - 'mem_fun' : is not a member of 'std'

c# - Visual Studio 在解决方案资源管理器中向项目名称添加一个数字

c++ - 如何从子类的构造函数初始化父类的私有(private)成员

c++ - 如何使用 PIC 编译 gnu libstdc++.a?

c++ - Variadic 模板参数顺序问题