Error, while trying to install CEGUI

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI Team, CEGUI Tools Developer, CEGUI MVP

Error, while trying to install CEGUI

Postby kanesoban » Thu Oct 29, 2009 2:02 pm

Hi all

When i try to make install CEGUI, i get this error:

CEGuiOgreBaseApplication.cpp:218: error: ‘class OIS::InputManager’ has no member named ‘numKeyBoards’
CEGuiOgreBaseApplication.cpp:225: error: ‘class OIS::InputManager’ has no member named ‘numMice’

I noticed, that someone else had the same problem:

viewtopic.php?p=13287&highlight=
(look at the 4th post)

The suggested solution for this is:

The fix for it is already in the source file. If you go to the location of the errors you should find a commented line for each error instance - if you comment the error line and uncomment the other line, you should find it compiles successfully.


I looked in CEGuiOgreBaseApplication.cpp, and there is no commented code whatsoever in that file, not around the lines that cause the errors, nor anywhere else.
Am i missing something? Could perhaps someone post the two correct lines of code?

Here is the function where the error occurs copied and pasted here:

Code: Select all
CEGuiDemoFrameListener::CEGuiDemoFrameListener(CEGuiBaseApplication* baseApp, Ogre::RenderWindow* window, Ogre::Camera* camera, bool useBufferedInputKeys, bool useBufferedInputMouse)
{
    // OIS setup
    OIS::ParamList paramList;
    size_t windowHnd = 0;
    std::ostringstream windowHndStr;

    // get window handle
    window->getCustomAttribute("WINDOW", &windowHnd);
   
    // fill param list
    windowHndStr << (unsigned int)windowHnd;
    paramList.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));

    // create input system
    d_inputManager = OIS::InputManager::createInputSystem(paramList);

    // create buffered keyboard
    if (d_inputManager->numKeyBoards() > 0)
    {
        d_keyboard = static_cast<OIS::Keyboard*>(d_inputManager->createInputObject(OIS::OISKeyboard, true));
        d_keyboard->setEventCallback(this);
    }

    // create buffered mouse
    if (d_inputManager->numMice() > 0)
    {
        d_mouse = static_cast<OIS::Mouse*>(d_inputManager->createInputObject(OIS::OISMouse, true));
        d_mouse->setEventCallback(this);
       
        unsigned int width, height, depth;
        int left, top;

        window->getMetrics(width, height, depth, left, top);
        const OIS::MouseState& mouseState = d_mouse->getMouseState();
        mouseState.width = width;
        mouseState.height = height;
    }

    // store inputs we want to make use of
    d_camera = camera;
    d_window = window;

    // we've not quit yet.
    d_quit = false;

    // setup base app ptr
    d_baseApp = baseApp;
}

kanesoban
Just popping in
Just popping in
 
Posts: 2
Joined: Thu Oct 29, 2009 12:46 pm

Re: Error, while trying to install CEGUI

Postby Jamarr » Thu Oct 29, 2009 5:41 pm

Please don't ever double-post. It is highly frowned upon.

Also, you did not post the version of CEGUI you are using. This makes it difficult to fully answer your question since different versions can have different semantics.

In regards to your problem, what search term did you try? I found several threads off of "numKeyBoards" which lead me to believe OIS at one point simply changed the name of the two methods in question (numKeyBoards and numMice). Logically it would make sense to look up these two functions in whatever version of OIS you are using and then change the code to use those function names instead? For example, as noted in this thread numKeyBoards was changed to numKeyboards.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!
Jamarr
CEGUI MVP
CEGUI MVP
 
Posts: 812
Joined: Tue Jun 03, 2008 11:59 pm
Location: USA

Re: Error, while trying to install CEGUI

Postby kanesoban » Thu Oct 29, 2009 6:33 pm

Please don't ever double-post. It is highly frowned upon.

Sorry, i didn't realise that i double posted. I will try to be more careful next time.

Also, you did not post the version of CEGUI you are using.

0.6.0

In regards to your problem, what search term did you try?

It didn't even occur to me to search the forums, i only googled certain keywords, that's how i found that forum post. But now searching for 'numKeyboard' turned up this post:

viewtopic.php?f=10&t=3202&p=14537&hilit=numKeyBoards#p14537

The post explained what has to be changed for what, so now i was able to install CEGUI, and the CEGUI Layout editor.

So thanks !
kanesoban
Just popping in
Just popping in
 
Posts: 2
Joined: Thu Oct 29, 2009 12:46 pm


Return to General Help

Who is online

Users browsing this forum: No registered users and 1 guest