致命错误LNK1120:10个未解决的外部因素 [英] fatal error LNK1120: 10 unresolved externals

查看:91
本文介绍了致命错误LNK1120:10个未解决的外部因素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1> ------构建开始:项目:Rumah3D,配置:调试Win32 ------
$
1> main.obj:错误LNK2019:未解析的外部符号" public:__ thishisall Image ::〜Image(void)" (?? 1Image @@ QAE @ XZ)在函数"public:void * __thiscall Image ::`scalar deletion destructor'(unsigned int)"中引用(?? _ GImage @@ QAEPAXI @ Z)
$
1> main.obj:错误LNK2019:未解析的外部符号" class Image * __cdecl loadBMP(char const *)" (?loadBMP @@ YAPAVImage @@ PBD @ Z)在函数"class Terrain * __cdecl loadTerrain(char const *,float)"中引用(?loadTerrain @@ YAPAVTerrain @@ PBDM @ Z)

1> main.obj:错误LNK2019:未解析的外部符号"public:__ thiscall Vec3f :: Vec3f(void)" (?? 0Vec3f @@ QAE @ XZ)在函数"public:__ thishisall Terrain :: Terrain(int,int)"中引用。 (?? 0Terrain @@ QAE @HH @ Z)
$
1> main.obj:错误LNK2019:未解析的外部符号"public:__thiscall Vec3f :: Vec3f(float,float,float)"函数"public:void __thiscall Terrain :: computeNormals(void)"中引用的(?? 0Vec3f @@ QAE @ MMM @ Z) (?computeNormals @ Terrain @@ QAEXXZ)

1> main.obj:错误LNK2019:未解析的外部符号"public:float& __thiscall Vec3f :: operator [](int)" (?? AVec3f @@ QAEAAMH @ Z)在函数"void __cdecl drawScene(void)"中引用。 (?drawScene @@ YAXXZ)
$
1> main.obj:错误LNK2019:未解析的外部符号" public:class Vec3f __thiscall Vec3f :: operator *(float)const"函数"public:void __thiscall Terrain :: computeNormals(void)"中引用的(?? DVec3f @@ QBE?AV0 @ M @ Z) (?computeNormals @ Terrain @@ QAEXXZ)

1> main.obj:错误LNK2019:未解析的外部符号" public:class Vec3f const& __thiscall Vec3f :: operator + =(class Vec3f const&)" (?? YVec3f @@ QAEABV0 @ ABV0 @@ Z)在函数"public:void __thiscall Terrain :: computeNormals(void)"中引用。
(?computeNormals @ Terrain @@ QAEXXZ)

1> main.obj:错误LNK2019:未解析的外部符号" public:float __thiscall Vec3f :: magnitude(void)const"函数"public:void __thiscall Terrain :: computeNormals(void)"中引用的(?magnitude @ Vec3f @@ QBEMXZ) (?computeNormals @ Terrain @@ QAEXXZ)

1> main.obj:错误LNK2019:未解析的外部符号" public:class Vec3f __thiscall Vec3f :: normalize(void)const" (?normalize @ Vec3f @@ QBE?AV1 @XZ)在函数"public:void __thiscall Terrain :: computeNormals(void)"中引用(?computeNormals @ Terrain @@ QAEXXZ)

1> main.obj:错误LNK2019:未解析的外部符号" public:class Vec3f __thiscall Vec3f :: cross(class Vec3f const&)const" (?cross @ Vec3f @@ QBE?AV1 @ ABV1 @@ Z)在函数"public:void __thiscall Terrain :: computeNormals(void)"中引用。
(?computeNormals @ Terrain @@ QAEXXZ)

1> C:\ Users\AHDA\Documents\Visual Studio 2012 \Projects\Rumah3D \Debug \ Rumah3D.exe:致命错误LNK1120:10个未解析的外部因素

==========构建:0成功,1个失败,0个最新,0跳过==== ======

1>------ Build started: Project: Rumah3D, Configuration: Debug Win32 ------
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall Image::~Image(void)" (??1Image@@QAE@XZ) referenced in function "public: void * __thiscall Image::`scalar deleting destructor'(unsigned int)" (??_GImage@@QAEPAXI@Z)
1>main.obj : error LNK2019: unresolved external symbol "class Image * __cdecl loadBMP(char const *)" (?loadBMP@@YAPAVImage@@PBD@Z) referenced in function "class Terrain * __cdecl loadTerrain(char const *,float)" (?loadTerrain@@YAPAVTerrain@@PBDM@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall Vec3f::Vec3f(void)" (??0Vec3f@@QAE@XZ) referenced in function "public: __thiscall Terrain::Terrain(int,int)" (??0Terrain@@QAE@HH@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall Vec3f::Vec3f(float,float,float)" (??0Vec3f@@QAE@MMM@Z) referenced in function "public: void __thiscall Terrain::computeNormals(void)" (?computeNormals@Terrain@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: float & __thiscall Vec3f::operator[](int)" (??AVec3f@@QAEAAMH@Z) referenced in function "void __cdecl drawScene(void)" (?drawScene@@YAXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: class Vec3f __thiscall Vec3f::operator*(float)const " (??DVec3f@@QBE?AV0@M@Z) referenced in function "public: void __thiscall Terrain::computeNormals(void)" (?computeNormals@Terrain@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: class Vec3f const & __thiscall Vec3f::operator+=(class Vec3f const &)" (??YVec3f@@QAEABV0@ABV0@@Z) referenced in function "public: void __thiscall Terrain::computeNormals(void)" (?computeNormals@Terrain@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: float __thiscall Vec3f::magnitude(void)const " (?magnitude@Vec3f@@QBEMXZ) referenced in function "public: void __thiscall Terrain::computeNormals(void)" (?computeNormals@Terrain@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: class Vec3f __thiscall Vec3f::normalize(void)const " (?normalize@Vec3f@@QBE?AV1@XZ) referenced in function "public: void __thiscall Terrain::computeNormals(void)" (?computeNormals@Terrain@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: class Vec3f __thiscall Vec3f::cross(class Vec3f const &)const " (?cross@Vec3f@@QBE?AV1@ABV1@@Z) referenced in function "public: void __thiscall Terrain::computeNormals(void)" (?computeNormals@Terrain@@QAEXXZ)
1>C:\Users\AHDA\Documents\Visual Studio 2012\Projects\Rumah3D\Debug\Rumah3D.exe : fatal error LNK1120: 10 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

推荐答案



Hi,

感谢您在此发布。

Thanks for posting here.

>> 1> C:\ Users \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $ b

>>1>C:\Users\AHDA\Documents\Visual Studio 2012\Projects\Rumah3D\Debug\Rumah3D.exe : fatal error LNK1120: 10 unresolved externals

您的代码中似乎使用了第三方库,Vec3f似乎与Vuforia更相关。

It seems that you have used the third-party library in your code, the Vec3f seems more related to the Vuforia.

我认为你需要检查包含该符号的第三方库是否已链接。

如果没有,你是可以使用#pragma comment(lib," lib_path")或其他链接第三方库的方法,详情请参见此处。 

   
https://stackoverflow.com/questions/3484434/what-does-pragma-评论意思


   
https://stackoverflow.com/questions/35008426/link-第三方图书馆 - 视觉工作室

I thinks you need to check if the third-party library which contains the symbol is linked or not.
If not, you could use #pragma comment(lib,"lib_path") or other methods to link the third-party library, more detail here. 
    https://stackoverflow.com/questions/3484434/what-does-pragma-comment-mean
    https://stackoverflow.com/questions/35008426/link-3rd-party-library-in-visual-studio

祝福,祝你好,b $ b

Best Wishes,

Jack Zhang

Jack Zhang





这篇关于致命错误LNK1120:10个未解决的外部因素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆