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

BulletPhysics: Error LNK2001: unresolved external symbol

我试图完成 this tutorial 创建一个带有子弹物理学的测试应用程序。我遵循了每一步,没有改变任何其他东西。 OS 是 Windows 8.1(64 位),Visual Studio 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 externes Symbol" 是 "unresolved external symbol"。我该如何解决这个问题?

此错误意味着在 header 中找到了函数(例如 btAlignedAllocInternal(...) ),但未找到实现(源代码)。您需要实现此功能的 .lib.dll(或者可能是 .cpp 文件)。该文件必须位于您的项目已知的文件夹中。链接器找不到这些文件,所以你的链接器错误发生了。 以下 post 可能会有所帮助:How to link a DLL in Visual Studio

编辑:您应该尝试已发布的 Visual Studio 项目,其中正确包含所有配置:...\bullet-2.81-rev2613\build\vs2010。 VS 2013 自动将其导入较新版本。