Hi,
We're trying to link against btBulletWorldImporter on Ubuntu/Linux (works perfectly on Windows, same version of the code) and the linker is reporting a few select undefined references -- which all seem to check-out as present in the .a and .o files (specifically btAngularLimit::set and btBoxShape::btBoxShape). This is version 2.80 of Bullet from the official tarball.
Are any of you aware of issues in this department?
Code:
build/mylib.a(PhysicsEngine.o): In function `physics::PhysicsEngine::createSpringConstraint(btRigidBody&, Situation const&)':
PhysicsEngine.cpp:(.text+0x39dd): undefined reference to `btGeneric6DofSpringConstraint::btGeneric6DofSpringConstraint(btRigidBody&, btTransform const&, bool)'
build/mylib.a(BulletCollisionShapeManager.o): In function `physics::BulletCollisionShapeManager::addBoxShape(Ogre::Vector3 const&)':
BulletCollisionShapeManager.cpp:(.text+0x2c5): undefined reference to `btBoxShape::btBoxShape(btVector3 const&)'
/usr/local/lib/libBulletWorldImporter.a(btBulletWorldImporter.o): In function `btBulletWorldImporter::createBoxShape(btVector3 const&)':
btBulletWorldImporter.cpp:(.text+0x3cdc): undefined reference to `btBoxShape::btBoxShape(btVector3 const&)'
/usr/local/lib/libBulletWorldImporter.a(btBulletWorldImporter.o): In function `btBulletWorldImporter::convertAllObjects(bParse::btBulletFile*)':
btBulletWorldImporter.cpp:(.text+0x8304): undefined reference to `btAngularLimit::set(float, float, float, float, float)'
btBulletWorldImporter.cpp:(.text+0x8e0c): undefined reference to `btAngularLimit::set(float, float, float, float, float)'
We've spent a fair bit of time digging into this, and the usual cause of linker errors in Linux is the ordering of libraries. However, it's not that, and it doesn't seem to be a cyclic dependency either. Bullet's libraries compiled correctly and contain the object files you'd expect, and those in turn contain the functions above...
My only suspicion is that the compilation settings are making the btBulletWorldImporter resolve a different reference... However, the problem is specifically (and only) for the functions above.
Anyway, help is very much appreciated!
Alex