【发布时间】:2019-02-23 10:36:20
【问题描述】:
PS。对不起..我不擅长说英语。
我想问一些关于 Bullet Physics SDK 的问题。 // 我使用 Visual Studio 2015 / Bullet 2.88
当前我的解决方案文件夹有 lib 文件、头文件
对于调试模式库文件: BulletCollision_vs2010_debug.lib / BulletDynamics_vs2010_debug.lib / LinearMath_vs2010_debug.lib
对于发布模式的 lib 文件: BulletCollision_vs2010.lib / BulletDynamics_vs2010.lib / LinearMath_vs2010.lib
我做了所有这样的设置
set inc Dir : Properties->C/C++->General->Additional Include Directories
set lib Dir : Properties->Linker->General->Additional Library Directories
set additional Dependencies : Properties->Linker->Input->Additional>Dependencies
set appropriate runtime library : Properties->C/C++->Code Generate->runtime ilbrary
但我的项目仍有错误
외부 기호를 확인할 수 없습니다. = unresolved external symbol
main.obj : 错误 LNK2001: "public: virtual float __thiscall btCollisionShape::getContactBreakingThreshold(float)const " (?getContactBreakingThreshold@btCollisionShape@@UBEMM@Z) 외부 기호를 확인할 수 없습니다.
main.obj : 错误 LNK2001: "public: virtual float __thiscall btCollisionShape::getAngularMotionDisc(void)const " (?getAngularMotionDisc@btCollisionShape@@UBEMXZ) 외부 기호를 확인할 수 없습니다。
main.obj : 错误 LNK2001: "public: virtual void __thiscall btCollisionShape::getBoundingSphere(类 btVector3 &,float &)const " (?getBoundingSphere@btCollisionShape@@UBEXAAVbtVector3@@AAM@Z) 외부기호를 확인할 수 없습니다.
main.obj : 错误 LNK2001: "public: virtual void __thiscall btConvexShape::project(类 btTransform 常量 &,类 btVector3 常量 &,float &,float &,btVector3 类 &,btVector3 类 &)const " (?project@btConvexShape@@UBEXABVbtTransform@@ABVbtVector3@@AAM2AAV3@3@Z) 외부 기호를 확인할 수 없습니다.
main.obj : 错误 LNK2001: "public: virtual void __thiscall btSphereShape::calculateLocalInertia(float,class btVector3 &)const " (?calculateLocalInertia@btSphereShape@@UBEXMAAVbtVector3@@@Z) 외부기호를 확인할 수 없습니다.
如何解决这些错误? 感谢您的收听!
【问题讨论】:
-
如果您打算更多地编程,我建议您切换到英语。否则您的错误将几乎无法搜索。
-
您确定 BulletDynamics 库是 version-independent 吗?否则,您可能需要为 VS2015 重新编译库。
-
@Passer 感谢您的建议。我再试一次
-
@agold 是的,我用 Visual Studio 2015 (v140) 编译 BulletDynamics
标签: c++ bulletphysics