Skip to main content
gamedev.net
🔒 Locked

CEGUI on Linux

Started by Boder 6 replies 2.4k views
Original Post
Boder
Boder
I am compiling a game on Linux, we recently added CEGUI support. I am having trouble with these headers because they are on Windows but not Linux.

        #include "CEGUIXMLParser.h"
        #include "CEGUIXMLHandler.h"
                - for XMLHandler
        #include "CEGUIXMLAttributes.h"

        #include <falagard/CEGUIFalWidgetLookManager>
BradDaBug
BradDaBug
Does #include "CEGUI.h" work? Does that include everything you need (I don't know; I'm a CEGUI noob)?
I like the DARK layout!
Seraphim
Seraphim
Linux fs' are case sensitive perhaps that's the problem. Otherwise it may just not be in your include path.
To do a case-insensitive search for all cegui related headers:
$> locate -i cegui*\.h

and make sure you give the correct include dirs to the compiler.
Boder
Boder
Here are all files.

.:CEGUIBase.h                     CEGUIPropertyHelper.hCEGUIcolour.h                   CEGUIPropertySet.hCEGUIColourRect.h               CEGUIRect.hCEGUIConfig.h                   CEGUIRefPtr.hCEGUIConfig_xmlHandler.h        CEGUIRenderableElement.hCEGUIDataContainer.h            CEGUIRenderableFrame.hCEGUIDefaultResourceProvider.h  CEGUIRenderableImage.hCEGUIEventArgs.h                CEGUIRenderer.hCEGUIEvent.h                    CEGUIResourceProvider.hCEGUIEventSet.h                 CEGUIScheme.hCEGUIExceptions.h               CEGUISchemeManager.hCEGUIFactoryModule.h            CEGUIScheme_xmlHandler.hCEGUIFont.h                     CEGUIScriptModule.hCEGUIFontManager.h              CEGUISingleton.hCEGUIFont_xmlHandler.h          CEGUISize.hCEGUIForwardRefs.h              CEGUIString.hCEGUIGlobalEventSet.h           CEGUISystem.hCEGUIGUILayout_xmlHandler.h     CEGUITexture.hCEGUI.h                         CEGUITextUtils.hCEGUIImage.h                    CEGUIVector.hCEGUIImageset.h                 CEGUIWindowFactory.hCEGUIImagesetManager.h          CEGUIWindowFactoryManager.hCEGUIImageset_xmlHandler.h      CEGUIWindow.hCEGUIInputEvent.h               CEGUIWindowManager.hCEGUIIteratorBase.h             CEGUIWindowProperties.hCEGUILogger.h                   elementsCEGUIMouseCursor.h              renderersCEGUIProperty.h./elements:CEGUIButtonBase.h                   CEGUIProgressBar.hCEGUIButtonBaseProperties.h         CEGUIProgressBarProperties.hCEGUICheckbox.h                     CEGUIPushButton.hCEGUICheckboxProperties.h           CEGUIRadioButton.hCEGUICombobox.h                     CEGUIRadioButtonProperties.hCEGUIComboboxProperties.h           CEGUIScrollbar.hCEGUIComboDropList.h                CEGUIScrollbarProperties.hCEGUIEditbox.h                      CEGUISlider.hCEGUIEditboxProperties.h            CEGUISliderProperties.hCEGUIFrameWindow.h                  CEGUIStatic.hCEGUIFrameWindowProperties.h        CEGUIStaticImage.hCEGUIGUISheet.h                     CEGUIStaticImageProperties.hCEGUIListbox.h                      CEGUIStaticProperties.hCEGUIListboxItem.h                  CEGUIStaticText.hCEGUIListboxProperties.h            CEGUIStaticTextProperties.hCEGUIListboxTextItem.h              CEGUITabButton.hCEGUIListHeader.h                   CEGUITabControl.hCEGUIListHeaderProperties.h         CEGUITabControlProperties.hCEGUIListHeaderSegment.h            CEGUITabPane.hCEGUIListHeaderSegmentProperties.h  CEGUIThumb.hCEGUIMultiColumnList.h              CEGUIThumbProperties.hCEGUIMultiColumnListProperties.h    CEGUITitlebar.hCEGUIMultiLineEditbox.h             CEGUITitlebarProperties.hCEGUIMultiLineEditboxProperties.h./renderers:OpenGLGUIRenderer./renderers/OpenGLGUIRenderer:openglrenderer.h  opengltexture.h


Edit: Might be a version problem, the binary version is old (0.2)

[Edited by - Boder on January 30, 2006 10:54:42 PM]
Seraphim
Seraphim
From your list I take it you've put all CEGUI files in the same directory as the source file?

Can you show us what the compiler spits out exactly?
Boder
Boder
Thank you all. It was a version problem. I compiled the latest CEGUI and the missing files are there.

But if anyone with autotools experience could give me an example of checking for CEGUI-OPENGL and linking with the OpenGL Renderer, that would be much appreciated. Right now I have a hack that looks something like this (without even checking if the OpenGL Renderer is installed).

configure.ac
CPPFLAGS="$CPPFLAGS `pkg-config --cflags CEGUI-OPENGL`"LLIBS="$LIBS `pkg-config --libs CEGUI-OPENGL`"
pjcast
pjcast
You could use something like this to detect CEGUI in your configure.ac:

PKG_CHECK_MODULES(CEGUI, CEGUI >= 0.4.0)
AC_SUBST(CEGUI_CFLAGS)
AC_SUBST(CEGUI_LIBS)

And, there is probably a package module for the opengl renderer, I havn't looked, but it should be fairly obvious, just look what cegui installs for its name.

Also, the above test will halt the configure process if cegui is not found. If you want configure to continue, you have to gracefully check for CEGUI (and openGl renderer for CEGUI). i do something like to detect CEGUI and Ogre and if found build some demos, else do not build any Ogre-CEGUI demos in my OIS project (www.sourceforge.net/projects/wgois) and you can look at my configure setup... Anyway, I use the acinclude.m4 file and add:

AC_DEFUN([OIS_ENABLE_OGRE_SAMPLE], [    AC_ARG_ENABLE(ogre,        AC_HELP_STRING([--disable-ogre],             [Disables the build of the OgreCEGUI ActionMap Demo]),            [build_ogre=$enableval], [build_ogre=yes])    if test "x$build_ogre" = "xyes" ; then        PKG_CHECK_MODULES(OGRE, OGRE >= 1.0.5, [ois_found_ogre=yes],[cegui_found_ogre=no])        AC_SUBST(OGRE_CFLAGS)        AC_SUBST(OGRE_LIBS)        PKG_CHECK_MODULES(CEGUI, CEGUI >= 0.4.0, [ois_found_cegui=yes],[ois_found_cegui=no])        AC_SUBST(CEGUI_CFLAGS)        AC_SUBST(CEGUI_LIBS)        if test "x$ois_found_ogre" = "xyes" && test "x$ois_found_cegui" = "xyes" ; then           ois_samples_use_ogre=yes            AC_MSG_NOTICE([Use of Ogre3D in Samples is Enabled])        else            ois_samples_use_ogre=no            AC_MSG_NOTICE([Ogre Demo Disabled])        fi    else        ois_samples_use_ogre=no        AC_MSG_NOTICE([Ogre Demo Disabled])    fi    AM_CONDITIONAL([OIS_BUILD_OGRE_SAMPLE], [test x$ois_samples_use_ogre = xyes])])


and, in my configure.ac I call OIS_ENABLE_OGRE_SAMPLE to call that function... The nice part is all this also sets up a --disable-ogre configure flag to optionally disable that building.. Anyway, depends on the level of checks and fallbacks you want. And, I was the AP above btw :D You can modify that function to work with CEGUI and OpenGL renderer for your setup.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.