link error btSimulationIslandManager::buildAndProcessIslands

cpeterso
Posts: 5
Joined: Mon Mar 17, 2008 2:01 am

link error btSimulationIslandManager::buildAndProcessIslands

Post by cpeterso »

I'm sure this problem is "User Error", but I'm stuck. I'm using gcc 4.0.1 on Mac OS X (PowerPC), but I'm more of a Windows/Visual Studio guy. <:)

I successfully built the Bullet libs and demos. When I copy and pasted the HelloWorld.cpp demo code into my new project and try to link with the libLibBullet*.a archives, I get the following link error:

Code: Select all

/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
btSimulationIslandManager::buildAndProcessIslands(btDispatcher*, btAlignedObjectArray<btCollisionObject*>&, btSimulationIslandManager::IslandCallback*)
btSimulationIslandManager::btSimulationIslandManager()
collect2: ld returned 1 exit status
If I change my project to reach into the bullet src directory and directly compile bullet-2.67-new/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp into my project, everything links correctly!

btSimulationIslandManager::buildAndProcessIslands() is the only missing symbol, which is strange. nm reports that my libLibBulletCollision.a indeed contains a symbol named btSimulationIslandManager::buildAndProcessIslands() (but the name is mangled so perhaps my problem is a type mismatch?).

I know my libLibBulletCollision.a is being found because if I comment it out from my project's CMakeLists.txt file, I get link errors for other bullet symbols (as one would expect).

thanks!
chris
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: link error btSimulationIslandManager::buildAndProcessIslands

Post by Erwin Coumans »

Do you use the right link order?

Order should be libLibBulletDynamics.a libLibBulletCollision.a libLibLinearmath.a, because Dynamics depends on Collision Detection and both depend on LinearMath.

Hope this helps,
Erwin
cpeterso
Posts: 5
Joined: Mon Mar 17, 2008 2:01 am

Re: link error btSimulationIslandManager::buildAndProcessIslands

Post by cpeterso »

oops! problem solved! <:D I didn't realize the link order mattered.

thanks,
chris