【发布时间】:2013-06-15 02:25:43
【问题描述】:
我在Eclipse中编译时出现以下错误:
make: *** [ogre-bullet-playground] Error 1
undefined reference to `btCapsuleShape::btCapsuleShape(float, float)'
undefined reference to `btRigidBody::btRigidBody(float, btMotionState*, btCollisionShape*, btVector3 const&)'
undefined reference to `btRigidBody::btRigidBody(float, btMotionState*, btCollisionShape*, btVector3 const&)'
undefined reference to `btConvexHullShape::btConvexHullShape(float const*, int, int)'
undefined reference to `btKinematicCharacterController::btKinematicCharacterController(btPairCachingGhostObject*, btConvexShape*, float, int)'
这些是我正在使用的库:
OgreMain
OIS
boost_system
OgreTerrain
BulletDynamics
BulletCollision
LinearMath
有人知道如何解决这个问题吗?我认为这些库还可以,我不知道为什么不编译。
【问题讨论】:
-
请上传您的代码。我认为这会有所帮助。
-
代码在这个问题中几乎没有用,因为它是一个参考问题。你可以用代码做很多事情。
-
它们都是缺少的 C++ 构造函数。您需要确定应该由哪个或哪些库提供这些构造函数,并在链接行中包含相关的一个或多个,或者重新排序库列表。
-
你知道如何检查我拥有的共享对象可以使用哪些构造函数吗?
标签: c++ linker bulletphysics