oScene loader demo application

antarctica2007

04-05-2008 01:29:10

is there a newer version than the one on the website (dated 2006)?

as ive been having some trouble getting it to compile under Eihort looks like a mix of absolute path references (fixed them) and something to do with how ogre handles (or rather doesnt any more) input:

Error 1 error C2065: 'mInputDevice' : undeclared identifier e:\msc\code\osceneloader_demo_dagon\include\oscenelibdemo.h 60


(had a quick search but could only find references to using the library not running the demo)

Thanks

(I only have the CE version)

Lioric

08-05-2008 03:02:28

I will review this and update with the newer Eihort version asap

felipecsl

14-05-2008 04:36:10

antarctica2007:

Replace the line that is generating the error with the following one:
if (mKeyboard->isKeyDown(OIS::KeyCode::KC_C) && timeDelay <= 0)

That will fix the problem, assuming you have correctly set up the references to OIS. There are several other things that had to be fixed. Please let me know if you are still running into problems.

antarctica2007

20-05-2008 23:59:33

ah excellent thanks to both, ill give that a shot, sorry it took me so long to reply - I seem to be unable to log into the addons forum using internet explorer for some reason?

antarctica2007

25-05-2008 18:41:50

@ felipecsl: that change did the trick, thanks very much!

williamoj

25-06-2008 18:28:51

help! I'm already replaced the error line with the follow:
if (mKeyboard->isKeyDown(OIS::KeyCode::KC_C) && timeDelay <= 0)

But still many error.

Ogre 1.4.8 (VC9)
oScene loader demo application source code (2006/28.07)


1>------ Build started: Project: Demo_oSceneLoader, Configuration: Debug Win32 ------
1>Compiling...
1>oSceneLibDemo.cpp
1>d:\program files\ogresdk\include\ogreparticleemitter.h : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
1>d:\program files\ogresdk\include\ogreparticlesystem.h(624) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
1>i:\desktop\osceneloader_demo_dagon\include\oscenelibdemo.h(59) : warning C4482: nonstandard extension used: enum 'OIS::KeyCode' used in qualified name
1>Linking...
1>oSceneLibDemo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class OIS::InputManager * __cdecl OIS::InputManager::createInputSystem(class std::multimap<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > &)" (__imp_?createInputSystem@InputManager@OIS@@SAPAV12@AAV?$multimap@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@Z) referenced in function "public: __thiscall ExampleFrameListener::ExampleFrameListener(class Ogre::RenderWindow *,class Ogre::Camera *,bool,bool,bool)" (??0ExampleFrameListener@@QAE@PAVRenderWindow@Ogre@@PAVCamera@2@_N22@Z)
1>oSceneLibDemo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: struct OIS::MouseState const & __thiscall OIS::Mouse::getMouseState(void)const " (__imp_?getMouseState@Mouse@OIS@@QBEABUMouseState@2@XZ) referenced in function "public: virtual void __thiscall ExampleFrameListener::windowResized(class Ogre::RenderWindow *)" (?windowResized@ExampleFrameListener@@UAEXPAVRenderWindow@Ogre@@@Z)
1>oSceneLibDemo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl OIS::InputManager::destroyInputSystem(class OIS::InputManager *)" (__imp_?destroyInputSystem@InputManager@OIS@@SAXPAV12@@Z) referenced in function "public: virtual void __thiscall ExampleFrameListener::windowClosed(class Ogre::RenderWindow *)" (?windowClosed@ExampleFrameListener@@UAEXPAVRenderWindow@Ogre@@@Z)
1>oSceneLibDemo.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall OIS::MouseState::buttonDown(enum OIS::MouseButtonID)const " (__imp_?buttonDown@MouseState@OIS@@QBE_NW4MouseButtonID@2@@Z) referenced in function "public: bool __thiscall ExampleFrameListener::processUnbufferedMouseInput(struct Ogre::FrameEvent const &)" (?processUnbufferedMouseInput@ExampleFrameListener@@QAE_NABUFrameEvent@Ogre@@@Z)
1>../bin/Debug/Demo_oSceneLoader.exe : fatal error LNK1120: 4 unresolved externals
1>Build log was saved at "file://i:\Desktop\oSceneLoader_demo_dagon\obj\Debug\BuildLog.htm"
1>Demo_oSceneLoader - 5 error(s), 3 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



I'm a Chinese boy. I'm sorry to my English. Please forgive me.

Lioric

26-06-2008 16:11:46

You need to link to the ois.lib (or ois_d.lib) library, add this library to the 'input' linker settings

williamoj

27-06-2008 05:49:57

:D Thanks Lioric's help, but I still have a problem. See below.



I have put the sceen.osm into the current working directory with the oSceneLoade.exe.

Lioric

28-06-2008 00:42:59

The osm scene (and all its media files, meshes, skeletons, materials, textures, shaders, external animations) must be in a location within your resource paths (the locations registered with the Ogre resource system), then you load the scene using the filename only, not the complete path (only scene.osm, not d:\locationX\locationY\scene.osm)

williamoj

28-06-2008 13:47:14

Oh, great! It works! Thanks Lioric.

Joyce123

28-10-2009 01:54:15

hi guys,

Although this topic had solved and it's been a long time since last post was in last year, but I am now dealing with same problem but it couldn't be solved so far.
I tried to run Demo example that I downed from Ofusion website and faced the same problem with antarctica2007 (the guy who created this topic) .I followed you guys way by replacing error line:

if (mKeyboard->isKeyDown(OIS::KeyCode::KC_C) && timeDelay <= 0)

But I now deal with new problem that is still an error here:

Error 1 fatal error LNK1104: cannot open file '..\obj\Debug\OgreOSMScene.obj' Demo_oSceneLoader

Does anyone know how to solve this error, pls help me. Thanks so much.

Joyce