problem compiling ogrebullet

dodgydan2001

09-03-2010 16:31:31

I have been trying to integrate ogrebullet into my own project, but I have issues with it linking.
I'd appreciate any advice or help anyone may have to help me solve the issue.

Heres my linker error.

Error 2 error LNK2019: unresolved external symbol "public: __thiscall btHingeConstraint::btHingeConstraint(class btRigidBody &,class btRigidBody &,class btVector3 const &,class btVector3 const &,class btVector3 &,class btVector3 &,bool)" (??0btHingeConstraint@@QAE@AAVbtRigidBody@@0ABVbtVector3@@1AAV2@2_N@Z) referenced in function "public: __thiscall OgreBulletDynamics::HingeConstraint::HingeConstraint(class OgreBulletDynamics::RigidBody *,class OgreBulletDynamics::RigidBody *,class Ogre::Vector3 const &,class Ogre::Vector3 const &,class Ogre::Vector3 const &,class Ogre::Vector3 const &)" (??0HingeConstraint@OgreBulletDynamics@@QAE@PAVRigidBody@1@0ABVVector3@Ogre@@111@Z) OgreBulletDynamicsHingeConstraint.obj

Error 3 error LNK2019: unresolved external symbol "public: __thiscall btHingeConstraint::btHingeConstraint(class btRigidBody &,class btVector3 const &,class btVector3 &,bool)" (??0btHingeConstraint@@QAE@AAVbtRigidBody@@ABVbtVector3@@AAV2@_N@Z) referenced in function "public: __thiscall OgreBulletDynamics::HingeConstraint::HingeConstraint(class OgreBulletDynamics::RigidBody *,class Ogre::Vector3 const &,class Ogre::Vector3 const &)" (??0HingeConstraint@OgreBulletDynamics@@QAE@PAVRigidBody@1@ABVVector3@Ogre@@1@Z) OgreBulletDynamicsHingeConstraint.obj

Fish

09-03-2010 19:53:22

Can you verify that your Bullet build is compiling btHingeConstraint.cpp into the bulletDynamics library?

-Fish

dodgydan2001

10-03-2010 21:08:09

I can confirm it is compiling it, I tried deleting the btHingeConstraint.obj and recompiling and it re-made it and continued complaining.

I had almost given up hope on fixing it when i simply removed the btHingeConstraint.cpp and btHingeConstraint.h from my project and now it compiles at least, but I'm sure I'm going to run into problems down the road when I actually intend to use the class. I dont understand why it has to be any different than any of the other classes in there, it doesnt contain anything significantly different for it to have these errors.

Thank you very much for your input Fish.

Fish

12-03-2010 12:21:25

Odd. What compiler are you using?

- Fish

dodgydan2001

17-03-2010 16:25:15

Issue solved, I wasnt thinking straight when I first tried building the project. I manually included all of the ogrebullet files myself, this was causing the issues.
The correct way to do it was by including the two ogrebullet projects in my solution, this fixed my wierd errors. :oops:

Now I'm trying to get hinges to behave (not go crazy) and compound objects to work, I've had no luck in getting compound objects to work properly thus far though.

Fish

17-03-2010 21:17:28

I'm glad you got it working. I have not used hinges or composite objects, so unfortunately I can't help you there. The folks on the Bullet Physics Forum are pretty good at getting things working, so you might try posting questions there.

-Fish