我试图完成本教程来创建一个带有子弹物理学的测试应用程序。我跟随着每一步,没有改变任何其他的东西。操作系统为Windows 8.1 (64位),Visual 2013。当我尝试调试或发布时,我会得到以下错误:
BulletTestApp.cpp
#include "stdafx.h"
#include "btBulletDynamicsCommon.h"
int _tmain(int argc, _TCHAR* argv[])
{
btBoxShape* box = new btBoxShape(btVector3(1, 1, 1));
return 0;
}调试
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".发布
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外部符号“是”未解决的外部符号“。我怎样才能解决这个问题?
发布于 2015-06-09 21:32:23
这个错误意味着函数(例如。btAlignedAllocInternal(...) )在标头中找到,但没有找到实现(源代码)。您需要实现此函数的.lib或.dll (或者可能是.cpp文件)。此文件必须位于项目已知的文件夹中。链接器找不到这些文件,因此会发生链接器错误。下面的帖子可能会有所帮助:如何在中链接DLL
编辑:您应该尝试附带的Visual项目,它正确地包含所有配置:.\int-2.81-rev2613\build\ all 2010。VS 2013自动将其导入较新的版本。
https://stackoverflow.com/questions/30742593
复制相似问题