Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: Problem while integrating OIS with OGRE  (Read 3453 times)

Corben

  • Guest
Problem while integrating OIS with OGRE
« on: December 07, 2005, 09:58:37 AM »

Hi!

I'm trying to integrate OIS with Ogre.

What I do is:
- Creating a new Ogre Application (with wizard)
- Copy and paste the code of the ExampleFrameListener.h modified in the OgreActionMapping example.
All the dependencies and includes seems to be ok.

What I get is only this error in linking phase:

OgreOISTest error LNK2019: unresolved external symbol "public: virtual void __thiscall OIS::Object::capture(void)" (?capture@Object@OIS@@UAEXXZ) referenced in function "public: virtual bool __thiscall ExampleFrameListener::frameStarted(struct Ogre::FrameEvent const &)" (?frameStarted@ExampleFrameListener@@UAE_NABUFrameEvent@Ogre@@@Z)

The two lines of codes that cause the crash are:
        //Need to capture/update each device
   mKeyboard->Keyboard::capture();      
   mMouse->Mouse::capture();

Anyone knows what I'm missing??

Thanks for the help!
Corben
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Problem while integrating OIS with OGRE
« Reply #1 on: December 07, 2005, 10:02:50 AM »

What OS/Compiler? Are you linking against OIS.lib? Are you linking against the static lib or dll lib (perhaps the class is not exported correctly if you are linking aginst the dll lib). I will take a look at that.. Though, sounds like you are just not linking aginst the lib.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Problem while integrating OIS with OGRE
« Reply #2 on: December 07, 2005, 10:04:56 AM »

Well, i just looked at the header.. and _OISExport exports the Object class. So that should not be your problem. However, let me know if you are trying to link against the dll version, as that will help me solve your troubles.
Logged

Corben

  • Guest
Problem while integrating OIS with OGRE
« Reply #3 on: December 07, 2005, 10:22:00 AM »

Hi pjcast!

You are really quick in replying!  :D

I'm using VS.Net 7.0 (Windows) and I'm using the static library solution. I have included OIS_d.lib in the debug configuration and OIS.lib in the release configuration.

Without that options a lot of other errors are given, so this is a countercheck that the lib file is correctly included!  :wink:

Thanks,
Corben
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Problem while integrating OIS with OGRE
« Reply #4 on: December 07, 2005, 10:52:24 AM »

Quote from: "Corben"
Hi pjcast!
Without that options a lot of other errors are given, so this is a countercheck that the lib file is correctly included!  :wink:

Yeah, I figured that you would be getting more unresolved's without linking to the lib.. Just a stab at the dark really :wink: ... I also use VC 7.0 on windows. I take it the OIS Ogre demos included work for you (compile and run)?
Logged

Corben

  • Guest
Problem while integrating OIS with OGRE
« Reply #5 on: December 09, 2005, 02:23:49 AM »

Yes... The demo compile but doesn't run! :P

Startin up, after the Ogre initialization window, I receive this error:

File: dbgdel.cpp
Line: 52
Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)

So I decided to build step by step a new Ogre application with OIS but without action mapping... Also because I will want that in my game Graphics and Input will be two separeted things!

And doing that I found the problems that started this thread!

Now I will try to debug this error, even if I really hate Microsoft way of debugging! :P

Thanks pjcast for support and for OIS!  :D

Corben
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Problem while integrating OIS with OGRE
« Reply #6 on: December 09, 2005, 09:16:32 AM »

What version of Ogre are you trying to use with OIS?
Logged

Corben

  • Guest
Problem while integrating OIS with OGRE
« Reply #7 on: December 09, 2005, 10:24:11 AM »

The last one: 1.0.6 Azathoth
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Problem while integrating OIS with OGRE
« Reply #8 on: December 09, 2005, 11:43:13 AM »

Hmm.. I've used 1.0.5 and see no reason why 1.0.6 would not work on windows.

So, niether of the Ogre demos run? The Actionmap or FF test? How about the OIS console demo?
Logged

Corben

  • Guest
Problem while integrating OIS with OGRE
« Reply #9 on: December 09, 2005, 03:18:46 PM »

No the Console compile and run correctly...

But consider that probably the problem is only mine! I'm asking help because I'm a newbie, probably it is something wrong in the way I configure the project or whatever...  :wink:

The ActionMap is the only executable, I don't have FF test! The version of OIS I'm using is ois-0-3-0-windows!

Thanks pjcast!
Corben
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Problem while integrating OIS with OGRE
« Reply #10 on: December 09, 2005, 03:33:09 PM »

You should get the latest version from cvs.. There was a bug in 0.3.0 running the demo without a joystick led to using a null pointer.. My bad on that one. That is more then likely your problem when using the OIS Ogre demo.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Problem while integrating OIS with OGRE
« Reply #11 on: December 09, 2005, 06:42:09 PM »

Also, the Ogre demos included are mainly intended for CEGUI 0.4.0 (currently used in Ogre cvs head) - since you are using Ogre 1.0.6 you will have to rebuild the OGRECEGUI Renderer against the CEGUI 0.4.0 version. Or, just use OIS in your own Gui (or NonGui) App and it should work.
Logged

Corben

  • Guest
Problem while integrating OIS with OGRE
« Reply #12 on: December 12, 2005, 07:06:30 AM »

I was trying the second solution, that is building my own Ogre app (not using CEGUI), but  I get the error I said at the beginning of this thread...

I will try again to play a little bit more with this solution and if don't manage to do it I will beg for your help again!  :wink:

Tnks,
Corben
Logged

Corben

  • Guest
Problem while integrating OIS with OGRE
« Reply #13 on: December 12, 2005, 02:00:06 PM »

I have a question pjcast...

I tried without success to find where in the project OgreActionMapping you include the OIS.lib file... I tried to delete every option in the project but the OIS.lib is still included in your project, even if it is not present anywhere.

Maybe I am linking to the library in the wrong way! Can give me some tips??

Thanks,
Corben
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Problem while integrating OIS with OGRE
« Reply #14 on: December 12, 2005, 02:08:19 PM »

Quote from: "Corben"
I have a question pjcast...

I tried without success to find where in the project OgreActionMapping you include the OIS.lib file... I tried to delete every option in the project but the OIS.lib is still included in your project, even if it is not present anywhere.

Maybe I am linking to the library in the wrong way! Can give me some tips??

Thanks,
Corben


I am not on windows right now.. But, if OIS.lib is not included by the Projects settings, linker, additioanl input section.. Then, perhaps I added it via the project dependency settings.. I cannot recall at this moment.
Logged