Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: Initializing OIS  (Read 1331 times)

azzolini

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 2
    • View Profile
Initializing OIS
« on: December 26, 2009, 02:41:32 PM »



 It is about linking/running Ogre release and release static
With ogre 1.6.4 and visua studio 2005 i can compile link and compile without errors...
Instead in release or releasestatic i can compile and link well
but at runtime program crush when initializing OIS  in fact in ogre.log
I reach this last message
23:23:03: *** Initializing OIS ***
but then program stops and exit !

 I supposed the problem was from resources not linked but this may be true for the releasestatic
but not for the release ( in fact ogremain.dll already contains needed resources )

What am i forgetting ???
Thanks Lorenzo


Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Re: Initializing OIS
« Reply #1 on: December 28, 2009, 07:09:25 PM »

You should try compiling in debug mode and run through the debugger. Or find the line that is causing the problem. If you are running the standard Ogre demos, they should tell you what exception was happening during startup as well.
Logged

azzolini

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 2
    • View Profile
Re: Initializing OIS
« Reply #2 on: December 29, 2009, 01:05:57 AM »

As i said before...
in debug mode (dll or static) all goes the right way!

The problem arises Only in release mode .
I suspect that the OIS.lib beeing for debugging, cannot function when linked with release Ogre.

...or something similar.....
....or may be that OIS system calls a function in a Ogre release static lib that causes the error... 

Anyway the matter is not about a single function logic or wrong declaration but it seem related
to the "static" initialization of the OIS system.

In Ogre i link with Ois.dll and ois.lib either in debug/debugstatic and in release/releasestatic

Where or how to get the static libs or the needed to link statically?

Thanks
Lorenzo
 

Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Re: Initializing OIS
« Reply #3 on: January 11, 2010, 07:00:59 PM »

OIS does not use Ogre at all, so there is no issue there. Release OIS works perfectly fine with release Ogre demos.

Your problem is either:
* You are linking debug OIS to release Ogre.
* You have some kind of exception which you need to try to catch/display
* There is a logic/memory error which only shows up for you in release (common)

Not sure what you mean about static release libs. Simply go to batch build -> Rebuild all, and you will get all forms of OIS (release/debug static, release/debug DLL). I suggest you add some more debugging output (cout, printf, etc). Also, you can run release mode through the debugger to find problems as well.
Logged