Mobius
14-11-2006 19:29:58
Hi, i have some problems when i'm compiling the code for oFusion
that's the erros.
.\Main.cpp(25) : error C2065: 'oSceneCallback' : undeclared identifier
.\Main.cpp(25) : error C2146: syntax error : missing ';' before identifier 'oe_Callback'
.\Main.cpp(25) : error C2065: 'oe_Callback' : undeclared identifier
that's the code:
// Create the scene loader
OSMScene oScene;
// Create an oE_Loader Callback object to post-process created objects
oSceneCallback oe_Callback;
// Initialises with the scene to be loaded and the callback if requiered
oScene.initialise("jail/object.osm", &oe_Callback);
// create and setup the scene in the root node
oScene.createScene();
mSceneMgr = oScene.getSceneManager();
Lioric
15-11-2006 18:44:38
If you need to get "event" notifications while loding your scene, you need to create an object derived from 'OSMSceneCallbacks' (as the 'oSceneCallback' is, see the Demo application)
You can pass NULL instead if you dont need the notifications
yuriythebest
23-12-2007 20:39:29
If you need to get "event" notifications while loding your scene, you need to create an object derived from 'OSMSceneCallbacks' (as the 'oSceneCallback' is, see the Demo application)
You can pass NULL instead if you dont need the notifications
I've just stumbled upon the same problem. I'm not real good with programming, can you explain in more detail what you mean?
Lioric
24-12-2007 15:30:13
The demo application has the sample code needed for using the scene events interface
If you dont need loading events in your application, pass "NULL" as the second argument of the initialise method
yuriythebest
24-12-2007 17:15:54
o..k- from what I understood I should change
oScene.initialise("jail/object.osm", &oe_Callback);
to
oScene.initialise("jail/object.osm", NULL);
however I'm still getting these error codes same as before:
1>d:\otest4\otest4\otest4\src\otest4.cpp(46) : error C2065: 'oSceneCallback' : undeclared identifier
1>d:\otest4\otest4\otest4\src\otest4.cpp(46) : error C2146: syntax error : missing ';' before identifier 'oe_Callback'
1>d:\otest4\otest4\otest4\src\otest4.cpp(46) : error C2065: 'oe_Callback' : undeclared identifier
Lioric
26-12-2007 15:42:40
Remove or comment that line, as you are not using the callback object
yuriythebest
26-12-2007 16:27:09
ok I removed it, now I'm getting:
1>otest4.obj : error LNK2019: unresolved external symbol "public: __thiscall OSMScene::~OSMScene(void)" (??1OSMScene@@QAE@XZ) referenced in function "protected: virtual void __thiscall otest4App::createScene(void)" (?createScene@otest4App@@MAEXXZ)
1>otest4.obj : error LNK2019: unresolved external symbol "public: bool __thiscall OSMScene::createScene(class Ogre::SceneNode *)" (?createScene@OSMScene@@QAE_NPAVSceneNode@Ogre@@@Z) referenced in function "protected: virtual void __thiscall otest4App::createScene(void)" (?createScene@otest4App@@MAEXXZ)
1>otest4.obj : error LNK2019: unresolved external symbol "public: bool __thiscall OSMScene::initialise(char const *,class OSMSceneCallbacks *)" (?initialise@OSMScene@@QAE_NPBDPAVOSMSceneCallbacks@@@Z) referenced in function "protected: virtual void __thiscall otest4App::createScene(void)" (?createScene@otest4App@@MAEXXZ)
1>otest4.obj : error LNK2019: unresolved external symbol "public: __thiscall OSMScene::OSMScene(class Ogre::SceneManager *,class Ogre::RenderWindow *)" (??0OSMScene@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@@Z) referenced in function "protected: virtual void __thiscall otest4App::createScene(void)" (?createScene@otest4App@@MAEXXZ)
1>bin\Debug\otest4.exe : fatal error LNK1120: 4 unresolved externals
here is how I included the ofusion cpp files as I'm guessing the problem is there:
Lioric
26-12-2007 21:05:33
In the documentation there is detailed the process of adding the scene loader to your applications
You need to add the .cpp files from the oSceneLoader "src" folder and from the "TinyXml" folders to your project solution