CAnt compile under vc 8

Thunder0ne

09-09-2007 08:21:30

I downloaded the "Source Only " link in the sticky thread.
My BULLET_HOME env variable is pointing to

D:\SDKs\bullet-2.57

which is the folder that contains the src folder.
I unzipped the package besides the ogresdk folder e.g:

d:\ogresdk

for ogre sdk and
d:\OgreBullet

for OgreBullet.
I have the following errors on compiling (debug settings):

..\..\src\OgreBulletCollisionsWorld.cpp(50) : error C2512: 'btCollisionDispatcher' : no appropriate default constructor available

..\..\src\Shapes\OgreBulletCollisionsTrimeshShape.cpp(66) : error C2664: 'btBvhTriangleMeshShape::btBvhTriangleMeshShape(const btBvhTriangleMeshShape &)' : cannot convert parameter 1 from 'btTriangleMesh *' to 'const btBvhTriangleMeshShape &'
Reason: cannot convert from 'btTriangleMesh *' to 'const btBvhTriangleMeshShape'
No constructor could take the source type, or constructor overload resolution was ambiguous

..\..\src\Shapes\OgreBulletCollisionsTrimeshShape.cpp(80) : error C2065: 'btMyTriangle' : undeclared identifier


By the way I added "$(OGRE_HOME)\include\OIS" in the include paths since it was not finding ois.h

Any help is much apreciated.

voxel

09-09-2007 13:45:04

You shouldn't be using an updated BULLET with OGREBullet for fear of breakage, but your compile problem is easy to solve.

That cast is failing due to the copy constructor being invoked...

Add a "false" flag or cast the first parameter to the MeshStridingInterface(?)

I just did this:

mShape = new btBvhTriangleMeshShape(mTriMesh, false);

Thunder0ne

09-09-2007 18:48:00

Thanks.
Once you told me I have the wrong version I have changed it a bit in order to let it compile and now it works.

TheNinja

07-11-2007 14:58:25

I have problems compiling the latest SDK version of OgreBullet.
It couldn't find btBulletCollisionCommon.h, which I fixed by adding
$(BULLET_HOME)\Others\echos\extern\Bullet
to the include path.
Another Problem was "w' : is not a member of 'btQuaternion". I fixed that by changing the following code in the OgreBulletConverter.h

static Ogre::Quaternion to(const btQuaternion &Q)
{
return Ogre::Quaternion(Q.w(), Q.x(), Q.y(), Q.z());
//return Ogre::Quaternion(Q.x(), Q.y(), Q.z(), Q[3]);
};

to

static Ogre::Quaternion to(const btQuaternion &Q)
{
//return Ogre::Quaternion(Q.w(), Q.x(), Q.y(), Q.z());
return Ogre::Quaternion(Q.x(), Q.y(), Q.z(), Q[3]);
};


There was also this compiler error:..\..\src\Shapes\OgreBulletCollisionsTrimeshShape.cpp(67) : error C2661: 'btBvhTriangleMeshShape::btBvhTriangleMeshShape' : no overloaded function takes 2 arguments
So I changed
mShape = new btBvhTriangleMeshShape(mTriMesh, useQuantizedAABB);
to
mShape = new btBvhTriangleMeshShape(mTriMesh);

But this is still leaving me with this compiler error:
c:\ogrebullet_sdk\collisions\include\OgreBulletCollisionsWorld.h(75) : error C2146: syntax error : missing ';' before identifier 'mDefaultCollisionConfiguration'

I believe it's because it can't find the datatype btDefaultCollisionConfiguration and I don't know how to fix this.

Btw: Two general questions about OgreBullet: Can I use joints and can I use Collada to import physics-information from blender into ogre bullet?

Thanks!

EDIT: I built bullet from the source and OgreBullet from the CVS source and this worked quite fine for me. The OgreBullet demo has graphic errors, but thats one of my minor problems right now ;)