Compile Error

lexex

19-01-2007 09:04:12

Hi @all,

I am new here. I have struggeled for 2 days now getting VC8 and ogreODE to work and sorry it is really a pain in the a**. Now I get a mysterious compile error (after I had some success compiling). My compiler complains at the following 2 lines:

_track = ei.createStaticTriangleMesh(_world, _world->getDefaultSpace());
ent->setUserObject (_track);


I took them from GranTurism demo. The errors I get are:

error C2660: 'OgreOde::EntityInformer::createStaticTriangleMesh': function does not accept 2 parameters
error C2664: 'Ogre::MovableObject::setUserObject': conversion of parameter 1 of 'OgreOde::TriangleMeshGeometry *' in 'Ogre::UserDefinedObject *' not possible

( I translated the error messages from german).

Please - can anybody help me?

tuan kuranes

19-01-2007 11:46:59

SDK, Source, CVS ?

Error you get suggest you're not using latest OgreOde header but old ones.

lexex

19-01-2007 16:30:11

Hi,

I installed
http://tuan.kuranes.free.fr/OgreOde_Source_Setup.exe
from
http://tuan.kuranes.free.fr/Ogre.html#OgreOde
and my include paths are:
C:\OgreOde\loader\include
C:\OgreOde\prefab\include
C:\OgreOde\ode\include
C:\OgreOde\include

and I am still getting those 2 errors.

Pretty please guide me to the light :-)

lexex

19-01-2007 21:34:33

Hi,

I am somewhat desperate. I even deleted the directory "ode" from OgreSDK so it shouldn't be possible to use the old OgreOde, right?

Another idea: Maybe the api has changed and the 2 lines of code I borrowed from the GranTurism demo (see first post) are not valid any more...
So this question:
Is it possible to compile the demos with OgreOde 0.7???

lexex

20-01-2007 10:09:58

My assumption was right: the constructor of entityinformer now is:
EntityInformer(Entity *entity,const Matrix4 &transform = Matrix4::IDENTITY);

please, OgreODE will never be as popular as newton unless the demos are up to date. Documentation is scarce and it is just not easy enough to get started. Please, is someone willing to share a small up to date samplecode to use OgreODE?

Since API changed, I tried:

// Create our ship entity
mShip = mSceneMgr->createEntity("razor", "razor.mesh");

// Create our control SceneNode
mControlNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
// Create a SceneNode for the ship
mShipNode= mControlNode->createChildSceneNode();
mShipNode->attachObject(mShip);
mShipNode->setPosition( Vector3( 0, -5, 0) );

// Here comes OgreODE part
OgreOde::EntityInformer ei(ent);
OgreOde::BoxGeometry* mBox = ei.createSingleStaticBox(_world->getDefaultSpace());
OgreOde::Body* mBody = new Body();
mBox->setBody(mBody);
mShipNode->attachObject(mBody);


compiles, but I get a runtime error which says: "Node already attached" and it seems to be caused by
mShipNode->attachObject(mBody);

Can anybody please help me?

tuan kuranes

20-01-2007 12:17:03

Downloadl link was wrong, redownload the good install package and you'll get up to date demos and code.

lexex

20-01-2007 14:06:27

Thank you very very much - now it will be more fun :D !!