[Reminder] undefined reference to btCollisionObject
Posted: Mon Nov 18, 2013 4:19 am
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) :
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.

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).Correct linking order wrote:LIBS += ../lib/Bullet/win32/libBulletDynamics.a
LIBS += ../lib/Bullet/win32/libBulletCollision.a
LIBS += ../lib/Bullet/win32/libLinearMath.a
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.
Happy collidingsTypical 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()'