Thread: Discovered error in OIS library, but am unsure if I'm correct! Please help!

  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    205

    Smile Discovered error in OIS library, but am unsure if I'm correct! Please help!

    Hi

    I am sorry the topic title isn't very descriptive. It's the best I could do. I have been trying to get a demo application of OGRE run using my IDE to compile the source.

    When trying to compile the launch.cpp (source) file it comes up with errors, which I thought it would, so no big deal. I have however found an inconsistency in a well respected 3rd party library. It is a line of code in this third party library which my IDE has found an error in. At first I thought it just a consequence of me not properly including relevant C++ header files. After checking though it seems more fundamental. Heres the line:

    Code:
    OIS::InputManager::destroyInputSystem(mInputManager);
    destroyInputSystem is a function defined in class InputManager which is inside namespace OIS. So far looks like the code checks out. The line is calling the function destroyInputSystem and loading in an argument with tag mInputManager which is a pointer.

    Trouble is when I looked in the actual class definition in OIS::InputManager the function destroyInputSystem does not take an argument! Has following define:

    Code:
    static void destroyInputSystem();
    Also when I change the relevant line of code above to:

    Code:
    OIS::InputManager::destroyInputSystem();
    With argument removed my IDE no longer complains on this issue when I compile. Seems highly unlikely though that I would have found something developer's of this respected 3rd party library would have missed. As it happens OIS stands for I think Object Input System. It's used for getting keyboard and joystick input.

    Can anyone tell me what's happening here? Thanks

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    250
    I am by no means an expert on OIS, however, you should make sure that this is not a version issue. Version X may define the function with no arguments, while this may have been changed in version Y.

  3. #3
    Registered User
    Join Date
    Jan 2010
    Posts
    205

    Lightbulb

    Ah thankyou for you suggestion. This indeed makes much sense and is most likely exactly what has happened. How this will affect the library's implementation I'm not sure but this I think is what has caused the issue.

    Assuming of course my assumptions are correct? Was my technical diagnosis of the code in my first post any good?

    It would be nice if someone could comment on that too as that would reassure me further that I am making some progres.

    Thanks for your reply

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Property Set Library (PSL) - Announcement
    By vultur_gryphus in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 05-29-2008, 06:04 AM
  2. very weird .h problem
    By royuco77 in forum C++ Programming
    Replies: 1
    Last Post: 09-11-2005, 07:55 AM