简体   繁体   English

如何使用Bullet Physics SDK清除VS2015中的错误LNK2001?

[英]How can I clear error LNK2001 in VS2015 with Bullet Physics SDK?

PS. PS。 sorry.. I'm not good at speaking English. 对不起..我英语不好。

I want to ask something about Bullet Physics SDK. 我想问一些关于Bullet Physics SDK的问题。 // I use Vistual Studio 2015 / Bullet 2.88 //我使用Vistual Studio 2015 / Bullet 2.88

current my solution folder have lib files, header files 当前我的解决方案文件夹中有lib文件,头文件

for debug mode lib files : BulletCollision_vs2010_debug.lib / BulletDynamics_vs2010_debug.lib / LinearMath_vs2010_debug.lib 用于调试模式的lib文件:BulletCollision_vs2010_debug.lib / BulletDynamics_vs2010_debug.lib / LinearMath_vs2010_debug.lib

for release mode lib files : BulletCollision_vs2010.lib / BulletDynamics_vs2010.lib / LinearMath_vs2010.lib 用于发布模式的lib文件:BulletCollision_vs2010.lib / BulletDynamics_vs2010.lib / LinearMath_vs2010.lib

and i did all setting like these 我做了所有这样的设置

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

but I have still error in my project 但是我的项目仍然有错误

외부 기호를 확인할 수 없습니다. = unresolved external symbol

main.obj : error LNK2001: "public: virtual float __thiscall btCollisionShape::getContactBreakingThreshold(float)const " (?getContactBreakingThreshold@btCollisionShape@@UBEMM@Z) 외부 기호를 확인할 수 없습니다. main.obj:错误LNK2001:“公共:虚拟浮点型__thiscall btCollisionShape :: getContactBreakingThreshold(float)const”(?getContactBreakingThreshold @ btCollisionShape @@ UBEMM @ Z)。

main.obj : error LNK2001: "public: virtual float __thiscall btCollisionShape::getAngularMotionDisc(void)const " (?getAngularMotionDisc@btCollisionShape@@UBEMXZ) 외부 기호를 확인할 수 없습니다. main.obj:错误LNK2001:“公共:虚拟浮点__thiscall btCollisionShape :: getAngularMotionDisc(void)const”(?getAngularMotionDisc @ btCollisionShape @@ UBEMXZ)。

main.obj : error LNK2001: "public: virtual void __thiscall btCollisionShape::getBoundingSphere(class btVector3 &,float &)const " (?getBoundingSphere@btCollisionShape@@UBEXAAVbtVector3@@AAM@Z) 외부 기호를 확인할 수 없습니다. main.obj:错误LNK2001:“公共:虚拟void __thiscall btCollisionShape :: getBoundingSphere(class btVector3&,float&)const”(?getBoundingSphere @ btCollisionShape @@ UBEXAAVbtVector3 @@ AAM @ Z)。

main.obj : error LNK2001: "public: virtual void __thiscall btConvexShape::project(class btTransform const &,class btVector3 const &,float &,float &,class btVector3 &,class btVector3 &)const " (?project@btConvexShape@@UBEXABVbtTransform@@ABVbtVector3@@AAM2AAV3@3@Z) 외부 기호를 확인할 수 없습니다. main.obj:错误LNK2001:“公共:虚拟void __thiscall btConvexShape :: project(class btTransform const&,btVector3 const&,float&,float&,btVector3&,btVector3&)const const“(?project @ btConvexShape @ @ UBEXABVbtTransform @@ ABVbtVector3 @@ AAM2AAV3 @ 3 @ Z)호를호를없습니다。

main.obj : error LNK2001: "public: virtual void __thiscall btSphereShape::calculateLocalInertia(float,class btVector3 &)const " (?calculateLocalInertia@btSphereShape@@UBEXMAAVbtVector3@@@Z) 외부 기호를 확인할 수 없습니다. main.obj:错误LNK2001:“公共:虚拟void __thiscall btSphereShape :: calculateLocalInertia(float,class btVector3&)const”(?calculateLocalInertia @ btSphereShape @@ UBEXMAAVbtVector3 @@@ Z)외부기호를다。

how can I fix these error? 我该如何解决这些错误? thank you for listening! 感谢您的收听!

错误btCollisionShape::getBoundingSphere(class btVector3 &,float &)看起来像你对我已经btScalar定义为单精度,但子弹库将被默认定义为btScalar双精度设置BT_USE_DOUBLE_PRECISION = 1,你需要做同样的在您的应用程序中,以确保类型对齐。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM