Hello!
I'm struggling with a linker error. I don't fully understand the problem and I'm out of ideas what else to try. Can someone please give advice?
The problem looks like this. I moved a Qt / Bullet Physics project to a new Win7 64 bit PC. Before I was developing it on a 32 bit Win7. The project compiles nicely there and runs without problems. I use the same Qt version 2010.05 on the new PC and I used the MinGW 4.4.0 that comes with it to compile the Bullet Physics library that is linked to my project. But when I build the project, I get linker errors like this:
./release\Joint.o:Joint.cpp:(.text+0x22e7): undefined reference to `btRigidBody::btRigidBody(float, btMotionState*, btCollisionShape*, btVector3 const&)'
./release\GroundPlane.o:GroundPlane.cpp:(.text+0x246 ): undefined reference to `btStaticPlaneShape::btStaticPlaneShape(btVector3 const&, float)'
The corresponding lines in the source look like this:
btRigidBody rigidBody = new btRigidBody(mass, &motionState, collisionShape, inertia);
btCollisionShape collisionShape = new btStaticPlaneShape(btVector3(0, 0, 1), 0);
btRigidBody rigidBody = new btRigidBody(mass, &motionState, collisionShape, inertia);
btCollisionShape collisionShape = new btStaticPlaneShape(btVector3(0, 0, 1), 0);
To copy to clipboard, switch view to plain text mode
I don't think the problem is in the source though, since it compiles and links perfectly fine on the 32 bit system. And it's not like every call to the Bullet library produces a linker error. Only a very few pop up and strangely, all of them have a float parameter, where actually a btScalar (Bullet's on floating point) should be used. The main difference between the old and new environment is the bitness, so I suspect that the problem may be coming from there, but I have no idea what exactly it could be. Any ideas where to dig next?
Thanks,
Cruz
Bookmarks