Page 1 of 1

[Solved]Problems compiling CEGUI for OGRE v1.10

Posted: Sun Jul 13, 2014 00:13
by holocronweaver
Hello all. OGRE dev here.

I am having trouble compiling CEGUI (v0-8 branch) for the current state of OGRE v1.10 (default branch) using gcc 4.8 on LInux. I fixed several straightforward missing includes, but cannot escape this error:

/home/jesse/lib/cegui/cegui/include/CEGUI/RendererModules/Ogre/Texture.h:102:22: error: field ‘d_texture’ has incomplete type
Ogre::TexturePtr d_texture;


I tried #include OgrePrerequisites.h and OgreTexture.h as these contain the TexturePtr and Texture class definitions respectively. I am aware this problem cropped up in an earlier post, but the advice given there to add forward declarations has already been patched into the current CEGUI repo. It seems my includes are not, um, being included, but I have no idea why.

I am very excited to give CEGUI a spin and abandon my clunky homespun GUI toolkit. :)

Re: Problems compiling CEGUI for OGRE v1.10

Posted: Sun Jul 13, 2014 09:30
by Kulik
Hi,

this is very puzzling. I looked into Ogre default branch and even just including OgreSharedPtr should solve this. If you put this to the top of the file:

Code: Select all

#include <OgreSharedPtr.h>


The problem should be gone.

If that doesn't fix it, the only explanation I have is that the header guard macro is somehow already defined, thus the header is not getting included.

The main reason why we do not include Ogre headers in the OgreRenderer.h file is to not creep dependencies onto users. This is important mainly for the python bindings where the user can import Ogre before or after they import CEGUI. The order would matter if we included Ogre headers in there.

Re: Problems compiling CEGUI for OGRE v1.10

Posted: Sun Jul 13, 2014 09:43
by Ident
This is very strange. Aside from what Kulik said, i have no suggestions.

I set up v0-8 to run with ogre default branch not too long ago but I don't remember having any issues with the Texture pointer. Btw, it would be nice if you we could integrate your fixes into CEGUI via a pull request, once you managed to get it running.

Re: Problems compiling CEGUI for OGRE v1.10

Posted: Sun Jul 13, 2014 12:11
by holocronweaver
Kulik wrote:I looked into Ogre default branch and even just including OgreSharedPtr should solve this.


DOH! I included everything except that! Worked like a charm, thankya.

Besides adding an include for OgreSharedPtr in Texture.h, I also had to make a few changes to the CEGuiOgreBaseApplication to accomodate the OGRE window system I designed. When it is finished and in the main repo, I will come back and submit a pull request.

Now to get down to business and make an ugly programmer-with-no-drawing-skills UI...

Re: Problems compiling CEGUI for OGRE v1.10

Posted: Sun Jul 13, 2014 12:26
by Ident
I hope you are using CEED for your programmer-art. Will make it much easier to create layouts and imagesets.

Regarding any changes to existing CEGUI files: if you make a PR with your changes, please use macros to check for the ogre version, so that older ogre versions wont be affected by your changes! then we can safely merge it for you.

Re: Problems compiling CEGUI for OGRE v1.10

Posted: Sun Jul 13, 2014 12:54
by holocronweaver
Will do!