Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: Can't use createInputSystem(...) [with Ogre]  (Read 1706 times)

Buenom

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 6
    • View Profile
Can't use createInputSystem(...) [with Ogre]
« on: June 01, 2009, 12:49:48 PM »

Hello,(else Bonjour,'cause i'm french)

I have this error with the latest OIS and Code::Blocks (latest too):

undefined reference to `OIS::InputManager::createInputSystem(unsigned int)'

And my code:
Code: [Select]
        size_t hWnd = 0;
        mWindow->getCustomAttribute("WINDOW", &hWnd);
        mInputManager = OIS::InputManager::createInputSystem(hWnd);

PS:I have previously include "OIS/OIS.h" and added to search directories the directory where the includes are ('cause else this don't work and OIS.h display errors which he can't include files who are in the same directory that him^^)<-not important

Thanks.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Re: Can't use createInputSystem(...) [with Ogre]
« Reply #1 on: June 01, 2009, 05:38:57 PM »

Sounds like you are using mixed headers/binary versions. Make sure you remove all old headers and OIS binaries and replace with the very latest from the build you made yourself. Also make sure, if you are using MSVC compiler and you are trying to use OIS as a DLL, you define #OIS_DYNLIB.
Logged

Buenom

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 6
    • View Profile
Re: Can't use createInputSystem(...) [with Ogre]
« Reply #2 on: June 02, 2009, 07:51:04 AM »

I have to compile OIS if I wwant to use it?

Cause,I believed include the main header and it's finish..
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Re: Can't use createInputSystem(...) [with Ogre]
« Reply #3 on: June 02, 2009, 08:57:33 AM »

If you are using the Ogre SDK, it should come with OIS prebuilt and you can just link to it.
If you are using Ogre from source, you definitely need to compile OIS and link it to your program.  :)
Logged

Buenom

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 6
    • View Profile
Re: Can't use createInputSystem(...) [with Ogre]
« Reply #4 on: June 02, 2009, 09:07:38 AM »

I have try to compile OIS but It's very difficult,too many other library depends...

Haven't you a OIS.a file?
Or what I need to compile OIS.
Or what I need to compile a programm which use OIS.

Thanks a lot of.
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Re: Can't use createInputSystem(...) [with Ogre]
« Reply #5 on: June 02, 2009, 09:10:36 AM »

Are you on linux or windows?
Logged

Buenom

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 6
    • View Profile
Re: Can't use createInputSystem(...) [with Ogre]
« Reply #6 on: June 02, 2009, 09:15:17 AM »

Windows xp.
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Re: Can't use createInputSystem(...) [with Ogre]
« Reply #7 on: June 02, 2009, 09:25:39 AM »

To compile it on Windows XP, I'm fairly sure all you need to get is the DirectX SDK: http://msdn.microsoft.com/en-us/directx/aa937788.aspx
In Code::Blocks, edit the project properties and specify where the headers and libraries of the sdk are in the appropriate sections.

A pre-compiled version can be found inside the Ogre SDK: http://www.ogre3d.org/download/sdk
Logged

Buenom

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 6
    • View Profile
Re: Can't use createInputSystem(...) [with Ogre]
« Reply #8 on: June 02, 2009, 10:22:32 AM »

In the new SDK of Ogre ,no OIS,it's now an internal engine for events.

EDIT:And I have to dowload SDL,DirectX and all dépendancies to compile OIS?....Why no simply OIS.a file....why?^^
« Last Edit: June 02, 2009, 10:28:29 AM by Buenom »
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Re: Can't use createInputSystem(...) [with Ogre]
« Reply #9 on: June 02, 2009, 04:53:28 PM »

You don't need to get SDL to use OIS, and the DirectX SDK is needed for DirectInput's headers and libraries.
I'd make you a pre-built version but I don't have windows, sorry. :(
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Re: Can't use createInputSystem(...) [with Ogre]
« Reply #10 on: June 02, 2009, 06:34:19 PM »

The Code::Blocks file for OIS only is missing one file (OISException.cpp), add that and compilation is easy - I'll probably see about adding that in, though I don't have or use C::B on windows.
Logged

Buenom

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 6
    • View Profile
Re: Can't use createInputSystem(...) [with Ogre]
« Reply #11 on: June 03, 2009, 11:20:26 AM »

Thanks for all.

But I have solve the problem,I use a little (but stronger) system built in Ogre.

So,thanks for all,and all yours replies
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Re: Can't use createInputSystem(...) [with Ogre]
« Reply #12 on: June 03, 2009, 02:54:16 PM »

Not sure what you mean, as far as I am aware Ogre uses OIS for all current releases.
Logged