2

PS. sorry.. I'm not good at speaking English.

I want to ask something about Bullet Physics SDK. // I use Vistual Studio 2015 / Bullet 2.88

current my solution folder have lib files, header files

for debug mode lib files : 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

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 : error LNK2001: "public: virtual float __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 : 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 : error LNK2001: "public: virtual void __thiscall btSphereShape::calculateLocalInertia(float,class btVector3 &)const " (?calculateLocalInertia@btSphereShape@@UBEXMAAVbtVector3@@@Z) 외부 기호를 확인할 수 없습니다.

how can I fix these error? thank you for listening!

S_C
  • 21
  • 1
  • I suggest you switch to English if you plan on programming more. Your errors will be almost unsearchable otherwise. – Passer By Feb 23 '19 at 10:37
  • Possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Passer By Feb 23 '19 at 10:38
  • Are you sure the BulletDynamics libraries are [version-independent](https://stackoverflow.com/a/1600413/1771479)? Otherwise, you might have to recompile the library for VS2015. – agold Feb 23 '19 at 11:12
  • @Passer By thank you for your advice. I'm trying again – S_C Feb 23 '19 at 11:25
  • @agold yes, I compile BulletDynamics with Visual Studio 2015 (v140) – S_C Feb 23 '19 at 11:26
  • to who read this because of same errors : I finally cleared all errors!! I used Bullet Physics SDK 2.88 ver, but I read QuickStart.pdf for 2.82. I built libs(collision, dynamic, linearmath) with build_visual_studio_vr_pybullet_double.bat file in bullet3-2.88 directory. but it had errors that I encountered. when I built with ver 2.82, there were no matters.(please look at 2.82's QuickStart.pdf to build project) I thank everyone who answered! :) – S_C Feb 24 '19 at 14:17

1 Answers1

3

The error btCollisionShape::getBoundingSphere(class btVector3 &,float &) looks to me like you have btScalar defined as single precision but the bullet library will by default define btScalar as double precision by setting BT_USE_DOUBLE_PRECISION = 1. You will need to do the same in your application to make sure the types are lined up.

PPC-Coder
  • 3,522
  • 2
  • 21
  • 30