【问题标题】:How can I clear error LNK2001 in VS2015 with Bullet Physics SDK?如何使用 Bullet Physics SDK 清除 VS2015 中的错误 LNK2001?
【发布时间】: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) 외부기호를 확인할 수 없습니다.

如何解决这些错误? 感谢您的收听!

【问题讨论】:

标签: c++ bulletphysics


【解决方案1】:

错误btCollisionShape::getBoundingSphere(class btVector3 &,float &) 在我看来就像您将 btScalar 定义为单精度,但项目符号库默认情况下通过设置 将 btScalar 定义为双精度BT_USE_DOUBLE_PRECISION = 1。您需要在应用程序中执行相同操作以确保类型对齐。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-10
    • 1970-01-01
    • 1970-01-01
    • 2013-05-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多