Compilation error on OgreEvenListeners.h

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 MVP, CEGUI Team

LunaCity
Just popping in
Just popping in
Posts: 4
Joined: Fri Dec 21, 2007 05:00

Compilation error on OgreEvenListeners.h

Postby LunaCity » Mon Dec 24, 2007 20:00

Looks like some of the sample code is not compiling because of a dependency on some deprecated code in Ogre.
OgreEventListeners.h doesn't exist anymore.

Is there any way I can make it skip the sample code, so the rest of CEGUI compiles?


g++ -DHAVE_CONFIG_H -I. -I. -I../../../include -I../../../Samples/common/include -I../../../include -I../../.. -DOGRE_GUI_gtk -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/local/include/OGRE -I/usr/local/include -I/usr/local/include/CEGUI -g -O2 -MT CEGuiSample.lo -MD -MP -MF .deps/CEGuiSample.Tpo -c CEGuiSample.cpp -fPIC -DPIC -o .libs/CEGuiSample.o
In file included from CEGuiSample.cpp:50:
../../../Samples/common/include/CEGuiOgreBaseApplication.h:36:32: error: OgreEventListeners.h: No such file or directory
../../../Samples/common/include/CEGuiOgreBaseApplication.h:93: error: expected class-name before ',' token
../../../Samples/common/include/CEGuiOgreBaseApplication.h:93: error: expected class-name before ',' token
../../../Samples/common/include/CEGuiOgreBaseApplication.h:94: error: expected class-name before '{' token
../../../Samples/common/include/CEGuiOgreBaseApplication.h:105: error: 'Ogre::MouseEvent' has not been declared
../../../Samples/common/include/CEGuiOgreBaseApplication.h:106: error: 'Ogre::MouseEvent' has not been declared
../../../Samples/common/include/CEGuiOgreBaseApplication.h:107: error: 'Ogre::KeyEvent' has not been declared
../../../Samples/common/include/CEGuiOgreBaseApplication.h:108: error: 'Ogre::KeyEvent' has not been declared
../../../Samples/common/include/CEGuiOgreBaseApplication.h:109: error: 'Ogre::MouseEvent' has not been declared
../../../Samples/common/include/CEGuiOgreBaseApplication.h:110: error: 'Ogre::MouseEvent' has not been declared
../../../Samples/common/include/CEGuiOgreBaseApplication.h:113: error: 'Ogre::KeyEvent' has not been declared
../../../Samples/common/include/CEGuiOgreBaseApplication.h:114: error: 'Ogre::MouseEvent' has not been declared
../../../Samples/common/include/CEGuiOgreBaseApplication.h:115: error: 'Ogre::MouseEvent' has not been declared
../../../Samples/common/include/CEGuiOgreBaseApplication.h:116: error: 'Ogre::MouseEvent' has not been declared
../../../Samples/common/include/CEGuiOgreBaseApplication.h:126: error: ISO C++ forbids declaration of 'EventProcessor' with no type
../../../Samples/common/include/CEGuiOgreBaseApplication.h:126: error: invalid use of '::'
../../../Samples/common/include/CEGuiOgreBaseApplication.h:126: error: expected ';' before '*' token
make[3]: *** [CEGuiSample.lo] Error 1
make[3]: Leaving directory `/home/tjk/CEGUI-0.5.0/Samples/common/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/tjk/CEGUI-0.5.0/Samples/common'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tjk/CEGUI-0.5.0/Samples'
make: *** [all-recursive] Error 1

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Tue Dec 25, 2007 10:52

Hi,

thanks for mentioning this, sounds rather severe! A while ago the SVN code base was patched to use OIS instead of this -now deprecated- Ogre input code, so that's why we didn't notice this ourselves.

Is it an option for you to move to SVN?
Check out my released snake game using Cegui!

LunaCity
Just popping in
Just popping in
Posts: 4
Joined: Fri Dec 21, 2007 05:00

Postby LunaCity » Thu Dec 27, 2007 00:00

Yeah, I will try that, what is the svn command to get it?

I downloaded from the website originally. Might be a good iea to fix that anyhow.

User avatar
fjeronimo
CEGUI Tools Developer (Retired)
Posts: 59
Joined: Tue Sep 11, 2007 16:57
Location: Lisbon, Portugal
Contact:

Postby fjeronimo » Thu Dec 27, 2007 13:38

Hi Lunacity,

Check the CELayoutEditor build guide (http://www.cegui.org.uk/phpBB2/viewtopic.php?t=2760), which also offers instructions on how to download and build CEGUI from the SVN trunk.
Frederico Jerónimo
Ignite Games - http://www.ignite-games.com
Ignite Games Institutional Site - http://we.ignite-games.com

LunaCity
Just popping in
Just popping in
Posts: 4
Joined: Fri Dec 21, 2007 05:00

Postby LunaCity » Tue Jan 08, 2008 22:33

Okay, so I tried building from the SVN trunk, but it won't compile because it depends on some 'numKeyBoards' variable in OIS, which doesn't exist.

I also tried updating the OIS code from the CVS trunk, but it didn't change anything. Still getting the compilation error on 'numKeyBoards'

Edit here's where it crashes on compile:
g++ -DHAVE_CONFIG_H -I. -I../../../include -I../../../Samples/common/include -I../../../include -I../../.. -DCEGUI_SAMPLE_DATAPATH=\"/usr/local/share/CEGUI\" -DOGRE_GUI_gtk -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/local/include/OGRE -I/usr/local/include -I/usr/local/include/CEGUI -I/usr/local/include/OIS -I/usr/local/include -g -O2 -MT CEGuiOgreBaseApplication.lo -MD -MP -MF .deps/CEGuiOgreBaseApplication.Tpo -c CEGuiOgreBaseApplication.cpp -fPIC -DPIC -o .libs/CEGuiOgreBaseApplication.o
CEGuiOgreBaseApplication.cpp: In constructor 'CEGuiDemoFrameListener::CEGuiDemoFrameListener(CEGuiBaseApplication*, Ogre::RenderWindow*, Ogre::Camera*, bool, bool)':
CEGuiOgreBaseApplication.cpp:242: error: 'class OIS::InputManager' has no member named 'numKeyBoards'
make[3]: *** [CEGuiOgreBaseApplication.lo] Error 1
make[3]: Leaving directory `/home/tjk/CEGUI-0.5.0/Samples/common/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/tjk/CEGUI-0.5.0/Samples/common'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tjk/CEGUI-0.5.0/Samples'
make: *** [all-recursive] Error 1

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Tue Jan 08, 2008 23:44

I believe the solution is to change numKeyBoards to numKeyboards

User avatar
ldb
Quite a regular
Quite a regular
Posts: 54
Joined: Sat Mar 24, 2007 13:39
Location: Bloomington, IL
Contact:

Postby ldb » Wed Jan 09, 2008 06:09

The OIS input code in the CEGUI OGRE samples depends on OIS version 1.0RC2. Version 1.0 looks like it's changed quite a bit. OIS::InputManager::numKeyBoards() is gone for example.

So, in order for the CEGUI OGRE samples to work again, they need to be updated to use OIS 1.0. Looks like it was replaced with:

int getNumberOfDevices( Type iType );

It would have been nice if the author of OIS hadn't made such drastic changes from 1.0RC2 to 1.0.
No matter where you go, there you are.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Wed Jan 09, 2008 08:06

Because suddenly this error seems to be popping up, also recently on my own machine regarding an Ogre addon, i've just gone to the bottom of this! Took me about 2 ... minutes.

Okay the v1.0 source release contains the 'numKeyboards' method, instead of the capital 'B'. However OIS's CVS indeed contains the new 'getNumberOfDevices' method. So at least it seems that it's wise to use the CVS trunk.

Good luck! :)

@ldb: i think you did create your OIS patch a while ago against the 1.0 version already. So i think Cegui should move to OIS from cvs.
Check out my released snake game using Cegui!

LunaCity
Just popping in
Just popping in
Posts: 4
Joined: Fri Dec 21, 2007 05:00

Postby LunaCity » Thu Jan 10, 2008 22:27

I'm already using the cvs trunk for OIS.
So what do I need to do? Hand edit the CEGUI OGRE Sample code that depends on this to use getNumberOfDevices?

Edit: Okay, so I changed it to use 'numKeyboards' ,and it got past that error.

Now I'm getting:
g++ -g -O2 -o .libs/Demo4 Sample_Demo4.o -L/home/tjk/CEGUI-0.5.0/src -L/home/tjk/CEGUI-0.5.0/Samples/common/src /home/tjk/CEGUI-0.5.0/src/.libs/libCEGUIBase.so /home/tjk/CEGUI-0.5.0/Samples/common/src/.libs/libCEGUISampleHelper.so -lfreeimage -lpthread -ldl -Wl,--rpath -Wl,/usr/local/lib
/usr/local/lib/libCEGUIOgreRenderer-1.4.5.so: undefined reference to `CEGUI::Exception::Exception(CEGUI::String const&)'
collect2: ld returned 1 exit status
make[3]: *** [Demo4] Error 1
make[3]: Leaving directory `/home/tjk/CEGUI-0.5.0/Samples/Demo4/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/tjk/CEGUI-0.5.0/Samples/Demo4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tjk/CEGUI-0.5.0/Samples'
make: *** [all-recursive] Error 1



Look I just want to get the darn thing to compile. I'm trying to build a simulator in Ogre, I'm not trying to be an ope source code developer.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Sat Jan 12, 2008 08:30

Hi,

To answer your original question:

Code: Select all

$ ./configure --disable-samples


If you just want to disable the use of Ogre in the samples, try:

Code: Select all

$ ./configure --without-ogre-renderer


I also highly recommend:

Code: Select all

$ ./configure --help

It can be most enlightening.

I'm not sure as to which versions of what you actually ended up using, if there is some version mismatch the current issue may remain - samples or not. Please post the versions of the components you ended up using if you require further assistance.

Priato
Just popping in
Just popping in
Posts: 5
Joined: Sun Jan 20, 2008 13:02

Postby Priato » Sun Jan 20, 2008 13:16

Hello,

I'm a new user of Linux(Kubuntu) and I've the same problem (first problem) than LunaCity with Ogre dependencies. Is there any other solutions than build CEGUI from SVN?

It's not a problem of makefile? I read some makefiles but I didn't find anything...

Note: In need ogre rendered and samples.

Thanks.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Mon Jan 21, 2008 07:48

Hi,

Can you please post the versions of the various libs that you're using.

I might (and it's a big might) get around to testing on Kubuntu later today if I get time. But to do that I need to know what versions of the libs you're using and where you got them from, meaning did you install via the package manager or from source - for Ogre, CEGUI, and any other relevant libs?

All such information helps us to help you.

Thanks

CE.

Priato
Just popping in
Just popping in
Posts: 5
Joined: Sun Jan 20, 2008 13:02

Postby Priato » Mon Jan 21, 2008 23:15

My problem on ogre appears in version 1.4.5. In Adept manager (apt) the version of CEGUI library is 0.5.0-2. I used apt-get install CEGUI, and I compiled it (libcegui-mk2-dev). I haved a CEGUI::FileIOException on "TaharezLook.looknfeel" loading.
When I have tried to compile and install the newest version 0.5.0, last current stable release, I haved the same problem than Luna City.

I've hope than I give you all informations you need.

thanks for your help.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Tue Jan 22, 2008 11:20

Thanks for the info - it enabled me to reproduce the issues exactly.

I think the issue is conflicts between versions obtained from the package manager and those not.

What I did here was to install libogre-dev from the repository and then try to build CEGUI from our stable source package. During configure, it did not detect that ogre was available, so I checked that and it's because the CEGUI-OGRE.pc file is not installed when you install ogre. So I installed libcegui-mk2 from the repositiory, and I see that it *does* include the required file (but is 'linking' to the prepackaged CEGUI not the one you're trying to build and link - hence the errors). I then was able to configure and attempt to build CEGUI - at which time I start to get the same errors as you guys.

I think the 'best' solution to avoid such mismatches is to remove the prepackaged versions of both Ogre and CEGUI and build both from source (applying any fixes needed for the OIS issues as you go).

Sorry it's not an easy fix, but time is short here and it's the best I could come up with at the moment :)

CE

Priato
Just popping in
Just popping in
Posts: 5
Joined: Sun Jan 20, 2008 13:02

Postby Priato » Tue Jan 22, 2008 13:31

Thanks for your analyse.

I didn't install Ogre from repository but from source package from official website. CEGUI was installed from apt-get.

I will try your solution, I'm here for training :) too.

I thought CEGUI-OGRE.pc allready exists, I will check it.

Thanks a lot CrazyEddie for your help.

Edit: CEGUI-OGRE.pc exists, but with apt version and not with sources.


Return to “Help”

Who is online

Users browsing this forum: Google [Bot] and 11 guests