0

I have the following errors when compiling in 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)'

These are the libraries I am using:

OgreMain
OIS
boost_system
OgreTerrain
BulletDynamics
BulletCollision
LinearMath

Does somebody knows how to fix this? The libraries are OK I think, I don't know why this isn't compiling.

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Pacha
  • 1,438
  • 3
  • 23
  • 46
  • Please upload your code. I think it can be helpful. – Charles0429 Jun 15 '13 at 02:34
  • The code is almost useless in this problem, as it is a reference problem. You can do much with the code. – Pacha Jun 15 '13 at 02:35
  • They're all C++ constructors that are missing. You'll need to work out which library or libraries should be providing those constructors, and include the relevant one or ones in the link line, or maybe reorder the list of libraries. – Jonathan Leffler Jun 15 '13 at 03:38
  • Do you know how to check what constructors are available with the shared objects I have? – Pacha Jun 15 '13 at 04:04

1 Answers1

0

undefined reference to `btCapsuleShape::btCapsuleShape(float, float)'

This constructor is supposed to be defined in the BulletCollision library.

These are the libraries I am using: ... BulletCollision

The most likely explanation is that you did something like this:

g++ -lBulletCollision ... main.cc

Don't do that. The order of source and object files and libraries on command line matters, and your order is likely wrong.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362