[Reminder] undefined reference to btCollisionObject

Post Reply
Stunts
Posts: 1
Joined: Mon Nov 18, 2013 3:59 am

[Reminder] undefined reference to btCollisionObject

Post by Stunts »

If anyone ever encounter similar building errors on their first attempt of building a project using bullet, it may be due to the linking order of the bullet libraries. AFAIK, the order should be as follow (for win and linux, apparently it didn't seem to matter when I was on mac) :
Correct linking order wrote:LIBS += ../lib/Bullet/win32/libBulletDynamics.a
LIBS += ../lib/Bullet/win32/libBulletCollision.a
LIBS += ../lib/Bullet/win32/libLinearMath.a
Note that the dynamics lib must be linked before the collision lib (the reverse of the order given by alphabetical rules of windows file system).

I know this subject must have been covered times and times again but I place another reminder here adding some classic errors messages so that it can be easier to find from your favorite search engine.
Typical error messages wrote:undefined reference to `btCollisionObject::~btCollisionObject()'
undefined reference to `btCollisionObject::serialize(void*, btSerializer*) const'
undefined reference to `btCollisionObject::btCollisionObject()'
undefined reference to `btCollisionObject::~btCollisionObject()'
undefined reference to `btCollisionObject::btCollisionObject()'
undefined reference to `btCollisionObject::~btCollisionObject()'
Happy collidings :D
Post Reply