Compiling error in CVS (PLSM2)

Frag91

14-03-2007 18:33:04

Hi, when i try to compile PLSM2, i got this error:


../../../Samples/Common/include/ExampleFrameListener.h:155: undefined reference to `OIS::InputManager::destroyInputSystem(OIS::InputManager*)'
../../../Samples/Common/include/ExampleFrameListener.h:155: undefined reference to `OIS::InputManager::destroyInputSystem(OIS::InputManager*)'
../../../Samples/Common/include/ExampleFrameListener.h:155: undefined reference to `OIS::InputManager::destroyInputSystem(OIS::InputManager*)'
PagingLandScape.o: In function `ExampleFrameListener':
../../../Samples/Common/include/ExampleFrameListener.h:110: undefined reference to `OIS::InputManager::createInputSystem(std::multimap<std::basic_string<char, s td::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char _traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::ch ar_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_s tring<char, std::char_traits<char>, std::allocator<char> > const, std::basic_str ing<char, std::char_traits<char>, std::allocator<char> > > > >&)'
PagingLandScape.o: In function `PagingLandScapeFrameListener':
../../../Samples/Common/include/PagingLandScape2FrameListener.h:68: undefined re ference to `OIS::InputManager::createInputSystem(std::multimap<std::basic_string <char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, s td::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std: :basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::b asic_string<char, std::char_traits<char>, std::allocator<char> > > > >&)'
PagingLandScape.o: In function `~PagingLandScapeFrameListener':
../../../Samples/Common/include/PagingLandScape2FrameListener.h:119: undefined r eference to `OIS::InputManager::destroyInputSystem(OIS::InputManager*)'
../../../Samples/Common/include/PagingLandScape2FrameListener.h:119: undefined r eference to `OIS::InputManager::destroyInputSystem(OIS::InputManager*)'
../../../Samples/Common/include/PagingLandScape2FrameListener.h:119: undefined r eference to `OIS::InputManager::destroyInputSystem(OIS::InputManager*)'
PagingLandScape.o: In function `PagingLandScapeFrameListener':
../../../Samples/Common/include/PagingLandScape2FrameListener.h:68: undefined re ference to `OIS::InputManager::createInputSystem(std::multimap<std::basic_string <char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, s td::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std: :basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::b asic_string<char, std::char_traits<char>, std::allocator<char> > > > >&)'
PagingLandScape.o: In function `~PagingLandScapeFrameListener':
../../../Samples/Common/include/PagingLandScape2FrameListener.h:119: undefined r eference to `OIS::InputManager::destroyInputSystem(OIS::InputManager*)'
../../../Samples/Common/include/PagingLandScape2FrameListener.h:119: undefined r eference to `OIS::InputManager::destroyInputSystem(OIS::InputManager*)'
../../../Samples/Common/include/PagingLandScape2FrameListener.h:119: undefined r eference to `OIS::InputManager::destroyInputSystem(OIS::InputManager*)'
../../../Samples/Common/include/PagingLandScape2FrameListener.h:119: undefined r eference to `OIS::InputManager::destroyInputSystem(OIS::InputManager*)'


The directory are:
ogremain:
SRC/ogrenew/
PLSM2:
SRC/ogreaddons/paginglandscape

How can i fix this?

clutch43

14-03-2007 19:41:45

you have to link the ois.lib , right click proj file, select properties, select Linker>Input....and add ois.lib,,hope that helps.

Frag91

14-03-2007 19:49:38

Yes, but I'm compiling on Linux, how can i make this with a Makefile?

clutch43

14-03-2007 21:43:06

OH,...sorry didnt realize you on Linux., wish i could help, not much exp with Linux and/or makefiles. if i come across something i'l post here. Good luck with prob, hope u find solution.

Frag91

15-03-2007 18:00:10

So, the OIS libs are correct linked, but I don't know why i got this error:
In the ExampleApplication.h there's this line:

OIS::InputManager::destroyInputSystem(mInputManager);

And in the /usr/local/include/OIS/OISInputManager.h
there is this method:
static void destroyInputSystem(InputManager* manager);

And, on compiling i got this error:

ExampleFrameListener.h:155: undefined reference to OIS::InputManager::destroyInputSystem(OIS::InputManager*)

Why it doesn't work?!??! :evil: :evil:

Could Someone who compiled PLSM2 on linux post me him ExampleApplication.h, PagingLandScape2FrameListener.h and OISInputManager.h ?

Please :cry:

.bash_killer

09-04-2007 07:59:24

I'm getting the same error on my Mac.

Undefined reference to OIS::InputManager::createInputSystem(.......)

I also can't compile the ExampleApplication.h because of this error. I downloaded the OIS-Source, because there are mac- and linux-specific files in there, but not for the method "createInputSystem" or "destroyInputSystem".

This seems to be a general OIS-problem.

/////////////////////////////////////////////////////////
OK, here's my solution: I added libois.a to my project and now everything works!

aprice2704

11-04-2007 11:12:47

Thanks for the tip about libs, I added the OIS.dll to my project linker list and all is now well.

Cheers

Andy

scippio

03-05-2007 01:17:31

I maybe solved this little problem...

edit:

....ogre_cvs/ogreaddons/paginglandscape/Samples/PagingLandScape2/src/Makefile


go to (line 107):

LIBS = -lILU -lIL -lz -lm -ldl


and add -lOIS like this:

LIBS = -lOIS -lILU -lIL -lz -lm -ldl


that's it.... compiling the Paging Landscape SceneManager...

sry for my english...