cchewif
15-08-2007 18:45:23
Hi,
I'm having trouble compiling with MinGW + bullet 2.55
Here 's the message :
This happens in
The problem seems to be that the variables returned by the converter are declared const by the compiler, because they are temporary. At first I thought MS Vc++ might automaticaly do something, but I have read in this forum that people have managed building OgreBullet on linux. So I have no idea where the problem might be.
I could always work around the problem and copy the converter's results before passing them to the constructor, but I'm not sure that would be clean.
I'm still bothered by the fact the two last arguments for the constructor are not const, especially since the bullet code shows that the constructor only calls copy constructors on those two btVector3.
What should be done ?
I'm having trouble compiling with MinGW + bullet 2.55
Here 's the message :
ogrebullet\Dynamics\src\Constraints\OgreBulletDynamicsHingeConstraint.cpp:: In constructor `OgreBulletDynamics::HingeConstraint::HingeConstraint(OgreBulletDynamics::RigidBody*, OgreBulletDynamics::RigidBody*, const Ogre::Vector3&, const Ogre::Vector3&, const Ogre::Vector3&, const Ogre::Vector3&)':
ogrebullet\Dynamics\src\Constraints\OgreBulletDynamicsHingeConstraint.cpp:58:error: no matching function for call to `btHingeConstraint::btHingeConstraint(btRigidBody&, btRigidBody&, btVector3, btVector3, btVector3, btVector3)'
[...]
candidates are :
[...]
btHingeConstraint::btHingeConstraint(btRigidBody&, btRigidBody&, const btVector3&, const btVector3&, btVector3&, btVector3&)
This happens in
mConstraint = new btHingeConstraint(
*rbA->getBulletRigidBody (),
*rbB->getBulletRigidBody (),
OgreBulletCollisions::OgreBtConverter::to(pivotInA),
OgreBulletCollisions::OgreBtConverter::to(pivotInB),
OgreBulletCollisions::OgreBtConverter::to(axisInA),
OgreBulletCollisions::OgreBtConverter::to(axisInB)
and other places in the code.The problem seems to be that the variables returned by the converter are declared const by the compiler, because they are temporary. At first I thought MS Vc++ might automaticaly do something, but I have read in this forum that people have managed building OgreBullet on linux. So I have no idea where the problem might be.
I could always work around the problem and copy the converter's results before passing them to the constructor, but I'm not sure that would be clean.
I'm still bothered by the fact the two last arguments for the constructor are not const, especially since the bullet code shows that the constructor only calls copy constructors on those two btVector3.
What should be done ?