Building PLSM 2 demo from CVS

MMatlock

04-07-2007 18:29:46

Hey, I can build the PLSM2 plugin and mapsplitter from CVS, however I am having some errors when building the demo. It first complained about not being about to locate OIS/OIS.h so I included the ogre dependencies folder as an extra include direction, the respective lib folders, however now I just get a series of linker errors in MSVC++ as follows:


Demo_PagingLandScape2 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)
Demo_PagingLandScape2 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)
Demo_PagingLandScape2 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)
Demo_PagingLandScape2 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)
Demo_PagingLandScape2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall OIS::KeyListener::~KeyListener(void)" (__imp_??1KeyListener@OIS@@UAE@XZ) referenced in function $L196763
Demo_PagingLandScape2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall OIS::MouseListener::~MouseListener(void)" (__imp_??1MouseListener@OIS@@UAE@XZ) referenced in function $L196763
Demo_PagingLandScape2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall OIS::KeyListener::KeyListener(void)" (__imp_??0KeyListener@OIS@@QAE@XZ) referenced in function "public: __thiscall PagingLandScapeFrameListener::PagingLandScapeFrameListener(class Ogre::RenderWindow *,class Ogre::Camera *,bool,bool)" (??0PagingLandScapeFrameListener@@QAE@PAVRenderWindow@Ogre@@PAVCamera@2@_N2@Z)
Demo_PagingLandScape2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall OIS::MouseListener::MouseListener(void)" (__imp_??0MouseListener@OIS@@QAE@XZ) referenced in function "public: __thiscall PagingLandScapeFrameListener::PagingLandScapeFrameListener(class Ogre::RenderWindow *,class Ogre::Camera *,bool,bool)" (??0PagingLandScapeFrameListener@@QAE@PAVRenderWindow@Ogre@@PAVCamera@2@_N2@Z)



Any help would be appreciate with getting this to compile. Also the mapsplitter gave me a runtime error when I ran it (I had to add "_d" to the end of the plugin name for PLSM2. But then it still gives a runtime error in the middle of mapsplitting on terrain.HSN.png. Thanks for the help!

Jon

05-07-2007 20:34:13

These errors appear to be due to a project file with the incorrect settings. I recall making changes, but then I am running a non-standard build tree.

The quoted linker errors are not from building the plugin or the mapsplitter, but rather the demo application. We need to be clear here.

PLSM does not use OIS. The demos do. OIS is not required for PLSM applications, but was used for these demos. I stress this because I have seen a lot of OIS questions in the main forums, and there is almost universal confusion about whether OIS is part of OGRE, or required by it.

That said, lets look at building the demo application. For a release build, under the linker tab, select 'Input' and add to 'Additional Dependancies':

OgreMain.lib ois.lib


For a debug build place _d before before the .lib (ie ois_d.lib). Make sure you have changed this field in both build configurations.

The issue with the plugin name is probably due to the wrong import library being linked. Add Plugin_PagingLandScapeSceneManager2_d.lib to the additional dependancies for debug builds.

I'm not sure if CVS currently dumps everything into one binary folder. I split mine into Debug and Release, so it is clear what is being built and used.

If two folders are being used, make sure the correct working directory is used in the 'Debugging' tab.

MMatlock

06-07-2007 15:48:52

Wow. I keep forgetting things like that. I had added the directories for the dependency libs, but forget to include the libs. Thats absurd. Thank you very much for pointing that out.