首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >BulletPhysics:错误LNK2001:未解析的外部符号

BulletPhysics:错误LNK2001:未解析的外部符号
EN

Stack Overflow用户
提问于 2015-06-09 20:51:33
回答 1查看 2.1K关注 0票数 2

我试图完成本教程来创建一个带有子弹物理学的测试应用程序。我跟随着每一步,没有改变任何其他的东西。操作系统为Windows 8.1 (64位),Visual 2013。当我尝试调试或发布时,我会得到以下错误:

BulletTestApp.cpp

代码语言:javascript
复制
#include "stdafx.h"
#include "btBulletDynamicsCommon.h"

int _tmain(int argc, _TCHAR* argv[])
{
btBoxShape* box = new btBoxShape(btVector3(1, 1, 1));
return 0;
}

调试

代码语言:javascript
复制
1>BulletTestApp.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""void * __cdecl btAlignedAllocInternal(unsigned int,int)" (?btAlignedAllocInternal@@YAPAXIH@Z)" in Funktion ""public: static void * __cdecl btBoxShape::operator new(unsigned int)" (??2btBoxShape@@SAPAXI@Z)".
1>BulletTestApp.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""void __cdecl btAlignedFreeInternal(void *)" (?btAlignedFreeInternal@@YAXPAX@Z)" in Funktion ""public: static void __cdecl btBoxShape::operator delete(void *)" (??3btBoxShape@@SAXPAX@Z)".
1>BulletTestApp.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: __thiscall btBoxShape::btBoxShape(class btVector3 const &)" (??0btBoxShape@@QAE@ABVbtVector3@@@Z)" in Funktion "_wmain".

发布

代码语言:javascript
复制
1>BulletTestApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol     ""void * __cdecl btAlignedAllocInternal(unsigned int,int)" (?btAlignedAllocInternal@@YAPAXIH@Z)".
1>BulletTestApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""void __cdecl btAlignedFreeInternal(void *)" (?btAlignedFreeInternal@@YAXPAX@Z)".
1>BulletTestApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: __thiscall btBoxShape::btBoxShape(class btVector3 const &)" (??0btBoxShape@@QAE@ABVbtVector3@@@Z)"

而"Nicht aufgel stes外部符号“是”未解决的外部符号“。我怎样才能解决这个问题?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-06-09 21:32:23

这个错误意味着函数(例如。btAlignedAllocInternal(...) )在标头中找到,但没有找到实现(源代码)。您需要实现此函数的.lib.dll (或者可能是.cpp文件)。此文件必须位于项目已知的文件夹中。链接器找不到这些文件,因此会发生链接器错误。下面的帖子可能会有所帮助:如何在中链接DLL

编辑:您应该尝试附带的Visual项目,它正确地包含所有配置:.\int-2.81-rev2613\build\ all 2010。VS 2013自动将其导入较新的版本。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30742593

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档