[Solved]Newbie question - oSceneLoader Demo with Dagon

Bapt

05-03-2006 01:14:22

I'm trying to understand how to use .osm files with ogre. I tried to build the Demo_oSceneLoader with the usual configuration for Visual Studio 2005 (as in the SettingUpAnApplication tutorial) but I get 25 errors :

Error 1 error C2039: 'TrackList' : is not a member of 'Ogre::Animation' c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 91
Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 91
Error 3 error C2143: syntax error : missing ';' before '&' c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 91
Error 4 error C2065: 'trackList' : undeclared identifier c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 91
Error 5 error C2039: '_getTrackList' : is not a member of 'Ogre::Animation' c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 91
Error 6 error C3083: 'TrackList': the symbol to the left of a '::' must be a type c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 93
Error 7 error C2039: 'const_iterator' : is not a member of 'Ogre::Animation' c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 93
Error 8 error C2065: 'const_iterator' : undeclared identifier c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 93
Error 9 error C2146: syntax error : missing ';' before identifier 'it' c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 93
Error 10 error C2065: 'it' : undeclared identifier c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 93
Error 11 error C2228: left of '.begin' must have class/struct/union c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 93
Error 12 error C3083: 'TrackList': the symbol to the left of a '::' must be a type c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 94
Error 13 error C2039: 'const_iterator' : is not a member of 'Ogre::Animation' c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 94
Error 14 error C2146: syntax error : missing ';' before identifier 'iend' c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 94
Error 15 error C2065: 'iend' : undeclared identifier c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 94
Error 16 error C2228: left of '.end' must have class/struct/union c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 94
Error 17 error C2227: left of '->second' must point to class/struct/union/generic type c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 97
Error 18 error C2039: 'getAssociatedNode' : is not a member of 'Ogre::AnimationTrack' c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 98
Error 19 error C2227: left of '->resetToInitialState' must point to class/struct/union/generic type c:\documents and settings\baptiste\my documents\visual studio 2005\projects\oscenedemo2\oscenedemo2\include\oSceneLibDemo.h 98
Error 20 error C2664: 'Ogre::Root::getSceneManager' : cannot convert parameter 1 from 'Ogre::SceneType' to 'const Ogre::String &' c:\Documents and Settings\Baptiste\My Documents\Visual Studio 2005\Projects\oSceneDemo2\oSceneDemo2\src\OgreOSMScene.cpp 208
Error 21 error C2039: 'createTrack' : is not a member of 'Ogre::Animation' c:\Documents and Settings\Baptiste\My Documents\Visual Studio 2005\Projects\oSceneDemo2\oSceneDemo2\src\OgreOSMScene.cpp 396
Error 22 error C2039: 'getNumTracks' : is not a member of 'Ogre::Animation' c:\Documents and Settings\Baptiste\My Documents\Visual Studio 2005\Projects\oSceneDemo2\oSceneDemo2\src\OgreOSMScene.cpp 396
Error 23 error C2039: 'setTranslate' : is not a member of 'Ogre::KeyFrame' c:\Documents and Settings\Baptiste\My Documents\Visual Studio 2005\Projects\oSceneDemo2\oSceneDemo2\src\OgreOSMScene.cpp 413
Error 24 error C2039: 'setRotation' : is not a member of 'Ogre::KeyFrame' c:\Documents and Settings\Baptiste\My Documents\Visual Studio 2005\Projects\oSceneDemo2\oSceneDemo2\src\OgreOSMScene.cpp 425
Error 25 error C2664: 'Ogre::Root::getSceneManager' : cannot convert parameter 1 from 'Ogre::SceneType' to 'const Ogre::String &' c:\Documents and Settings\Baptiste\My Documents\Visual Studio 2005\Projects\oSceneDemo2\oSceneDemo2\src\OgreOSMScene.cpp 442
Warning 26 warning C4482: nonstandard extension used: enum 'Ogre::Light::LightTypes' used in qualified name c:\Documents and Settings\Baptiste\My Documents\Visual Studio 2005\Projects\oSceneDemo2\oSceneDemo2\src\OgreOSMScene.cpp 641
Warning 27 warning C4482: nonstandard extension used: enum 'Ogre::Light::LightTypes' used in qualified name c:\Documents and Settings\Baptiste\My Documents\Visual Studio 2005\Projects\oSceneDemo2\oSceneDemo2\src\OgreOSMScene.cpp 644
Warning 28 warning C4482: nonstandard extension used: enum 'Ogre::Light::LightTypes' used in qualified name c:\Documents and Settings\Baptiste\My Documents\Visual Studio 2005\Projects\oSceneDemo2\oSceneDemo2\src\OgreOSMScene.cpp 652


I don't understand how I can make this work. Anybody? :P

Nowec

05-03-2006 01:22:47

it seems like you haven't included Ogre like you should...

Make sure that your app can find Ogre.h.

Bapt

05-03-2006 01:37:26

It should be able to find it as I added the OgreMain\include folder in "additional include directories" in the project properties and oSceneLibDemo.h includes ExempleApplication.h which includes ogre.h (VS2005 at least can find it as I can open it with a right click on the filename).

Lioric

05-03-2006 02:25:51

Somehow your application is not including the "OgreAnimation.h" and "OgreAnimationTrack.h" files, test by including them in your applications headers

Additionally, open the "OgreAnimation.h" file and see if the "TrackList" is typedef'ed somewhere

Nowec

05-03-2006 09:40:48

Somehow your application is not including the "OgreAnimation.h" and "OgreAnimationTrack.h" files, test by including them in your applications headers
Aren't they included in Ogre.h?
At least they are in both my old version of Azathoth, and in yesterdays version of Dagon...

Bapt

05-03-2006 15:05:46

As Nowec said, they're included in ogre.h. But TrackList seems not to be typedefed in OgreAnimation.h. I can only find NodeTrackList, NumericTrackList and VertexTracklist. I have the version built from the CVS (last friday).

Bapt

05-03-2006 17:23:40

I solved the errors by modifying oFusion library files according to the Dagon porting notes.

In case it interests other newbs like me here is the direct link.

NHunter

20-03-2006 16:13:03

also ported demo code to dagon,but im stuck in SceneManager changes..

Code:

mSceneMgr = Root::getSingleton().getSceneManager(Ogre::ST_GENERIC);

and

Ogre::SceneType sceneType = static_cast<Ogre::SceneType>(type);
mSceneMgr = Ogre::Root::getSingleton().getSceneManager(sceneType);

i suppose the answer will be too easy,but i didnt see even reading the dagonnotes.
Bapt,if you can tell me...thx

btw,how i do to post code in a separated white space? :roll:

Lioric

20-03-2006 17:03:18

It should be:

mSceneMgr = Root::getSingleton().createSceneManager(ST_GENERIC);

and

SceneType sceneType = static_cast<SceneType>( 1 << (type - 1) );
mSceneMgr = Root::getSingleton().createSceneManager(sceneType);



I will update the sceneLoader to Dagon this week

NHunter

20-03-2006 17:39:53

thats it,works,except for some issue on VET_COLORS on mesh,but i think i already see a post about on the forum.

thanks men.

Steve.Dev

22-03-2006 20:03:16

Hi.

I just ran into the issue of your error 23 and 24

setTranslate: is not a member of "Ogre::KeyFrame"
setRotation: is not a member of "Ogre::keyFrame"

how can I resolve this? thanks...I'm new to this.

Steve

manowar

23-03-2006 11:50:17

@Steve.Dev

Look at http://www.ogre3d.org/wiki/index.php/Da ... ting_notes

You have to replace Ogre::Keyframe by Ogre::TransformKeyFrame

Eric

Steve.Dev

24-03-2006 22:57:54

Thanks.