[Solved] Problems On Linux When Adding To My Own Project

nikki

10-08-2008 19:12:22

I get the following errors on Linux when I add OgreBullet to my own project:-
In function `btGImpactCollisionAlgorithm::gimpact_vs_shape(btCollisionObject*, btCollisionObject*, btGImpactShapeInterface*, btCollisionShape*, bool)':
btGImpactCollisionAlgorithm.cpp:(.text+0x268e): undefined reference to `btBU_Simplex1to4::btBU_Simplex1to4()'

In function `btGImpactCollisionAlgorithm::gimpact_vs_gimpact(btCollisionObject*, btCollisionObject*, btGImpactShapeInterface*, btGImpactShapeInterface*)':
btGImpactCollisionAlgorithm.cpp:(.text+0x33c5): undefined reference to `btBU_Simplex1to4::btBU_Simplex1to4()'
btGImpactCollisionAlgorithm.cpp:(.text+0x34c7): undefined reference to `btBU_Simplex1to4::btBU_Simplex1to4()'
/usr/local/lib/libGIMPACT.a(btGImpactCollisionAlgorithm.o):(.data.rel.ro._ZTV20btTetrahedronShapeEx[vtable for btTetrahedronShapeEx]+0x50): undefined reference to `btBU_Simplex1to4::getNumVertices() const'
/usr/local/lib/libGIMPACT.a(btGImpactCollisionAlgorithm.o):(.data.rel.ro._ZTV20btTetrahedronShapeEx[vtable for btTetrahedronShapeEx]+0x54): undefined reference to `btBU_Simplex1to4::getNumEdges() const'
/usr/local/lib/libGIMPACT.a(btGImpactCollisionAlgorithm.o):(.data.rel.ro._ZTV20btTetrahedronShapeEx[vtable for btTetrahedronShapeEx]+0x58): undefined reference to `btBU_Simplex1to4::getEdge(int, btVector3&, btVector3&) const'
/usr/local/lib/libGIMPACT.a(btGImpactCollisionAlgorithm.o):(.data.rel.ro._ZTV20btTetrahedronShapeEx[vtable for btTetrahedronShapeEx]+0x5c): undefined reference to `btBU_Simplex1to4::getVertex(int, btVector3&) const'
/usr/local/lib/libGIMPACT.a(btGImpactCollisionAlgorithm.o):(.data.rel.ro._ZTV20btTetrahedronShapeEx[vtable for btTetrahedronShapeEx]+0x60): undefined reference to `btBU_Simplex1to4::getNumPlanes() const'
/usr/local/lib/libGIMPACT.a(btGImpactCollisionAlgorithm.o):(.data.rel.ro._ZTV20btTetrahedronShapeEx[vtable for btTetrahedronShapeEx]+0x64): undefined reference to `btBU_Simplex1to4::getPlane(btVector3&, btVector3&, int) const'
/usr/local/lib/libGIMPACT.a(btGImpactCollisionAlgorithm.o):(.data.rel.ro._ZTV20btTetrahedronShapeEx[vtable for btTetrahedronShapeEx]+0x68): undefined reference to `btBU_Simplex1to4::isInside(btVector3 const&, float) const'
/usr/local/lib/libGIMPACT.a(btGImpactCollisionAlgorithm.o):(.data.rel.ro._ZTV20btTetrahedronShapeEx[vtable for btTetrahedronShapeEx]+0x6c): undefined reference to `btBU_Simplex1to4::getIndex(int) const'
/usr/local/lib/libGIMPACT.a(btGImpactCollisionAlgorithm.o):(.data.rel.ro._ZTI20btTetrahedronShapeEx[typeinfo for btTetrahedronShapeEx]+0x8): undefined reference to `typeinfo for btBU_Simplex1to4'

It seems that GIMPACT isn't properly linking with btCollisions?

The current link order is:-
libbulletmath
libbulletcollisions
libbulletdynamics
libOgreBulletCol
libOgreBulletDyn
libGIMPACT

If I move GIMPACT above OgreBullet, I get errors where GIMPACT isn't defined for OgreBullet.

How can I fix this?

EDIT: Remarkably, changing the order to this worked:-
libOgreBulletCol
libOgreBulletDyn
libGIMPACT
libbulletmath
libbulletcollisions
libbulletdynamics
:)