[Solved]Problems compiling CEGUI for OGRE v1.10

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

holocronweaver
Just popping in
Just popping in
Posts: 4
Joined: Mon Feb 11, 2013 21:45

[Solved]Problems compiling CEGUI for OGRE v1.10

Postby holocronweaver » Sun Jul 13, 2014 00:13

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. :)

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Problems compiling CEGUI for OGRE v1.10

Postby Kulik » Sun Jul 13, 2014 09:30

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.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Problems compiling CEGUI for OGRE v1.10

Postby Ident » Sun Jul 13, 2014 09:43

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.
CrazyEddie: "I don't like GUIs"

holocronweaver
Just popping in
Just popping in
Posts: 4
Joined: Mon Feb 11, 2013 21:45

Re: Problems compiling CEGUI for OGRE v1.10

Postby holocronweaver » Sun Jul 13, 2014 12:11

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...

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Problems compiling CEGUI for OGRE v1.10

Postby Ident » Sun Jul 13, 2014 12:26

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.
CrazyEddie: "I don't like GUIs"

holocronweaver
Just popping in
Just popping in
Posts: 4
Joined: Mon Feb 11, 2013 21:45

Re: Problems compiling CEGUI for OGRE v1.10

Postby holocronweaver » Sun Jul 13, 2014 12:54

Will do!


Return to “Help”

Who is online

Users browsing this forum: No registered users and 6 guests