Problem compiling with latest Ogre

ceacy

31-05-2007 16:39:40

The OgreMovableObject interface has changed, and that causes a compilation error since the new method is pure virtual :
OgreOdeDebugContact.cpp: In constructor 'OgreOde::DebugContact::DebugContact(const Ogre::String&, OgreOde::World*)':
OgreOdeDebugContact.cpp:48: error: cannot allocate an object of abstract type 'OgreOde::DebugContactText'
../include/OgreOdeDebugContact.h:50: note: because the following virtual functions are pure within 'OgreOde::DebugContactText':
/usr/local/include/OGRE/OgreMovableObject.h:471: note: virtual void Ogre::MovableObject::visitRenderables(Ogre::Renderable::Visitor*, bool)


I don't know what this functions does, but would an empty implementation suffice ?

rewb0rn

31-05-2007 17:27:30

it might, but I guess there is some kind of child class to DebugContactText you should use instead, else abstract functions dont make sense.

ceacy

31-05-2007 19:35:48

Actually, the compilation error isn't in my application ; but in OgreODE itself.

rewb0rn

31-05-2007 21:42:55

then download the latest ogreode version from cvs.

ceacy

01-06-2007 17:09:24

That's what i did, or at least i think so (and i just have retried after a "cvs update -Pd").

syedhs

01-06-2007 18:10:07

You are downloading HEAD, which is 1.5 (Shoggoth). I dont think OgreODE for Shoggoth exist, but the compilation errors are easily rectified; add all MovableObject in OgreODE the missing pure virtual functions with empty body eg:-

class DebugContact {
..
// add this!
void visitRenderables(Ogre::Renderable::Visitor*, bool) {}

ceacy

02-06-2007 13:25:59

Thank you ! I had to add this to several classes, and to edit the prefab/include/makefile.(am|in) files to comment the lines about "OgreOdeDotLoader.h".
It's working, now.