Page 1 of 1

[SOLVED] Redefinition of Ogre::TexturePtr while compiling

Posted: Wed Aug 28, 2013 21:54
by BrightBit
Hi CEGUI community,

I got the current sources of CEGUI, Ogre and their dependencies by their corresponding repositories. Microsoft Visual Studio Express 2012 (v11) was used to compile all these sources, i.e. right now I am using Windows 7. I've compiled all dependencies and Ogre without problems but compiling the CEGUIOgreRenderer results in the following compile time error:

Code: Select all

error C2371: 'Ogre::TexturePtr': redefinition; different basic types   c:\programming\builds\ogre\sdk\include\ogre\OgrePrerequisites.h

I'm not sure if the typedef SharedPtr<Texture> TexturePtr; in CEGUI's Renderer.h is causing this problem. Any ideas on how to fix this? Please tell me if you need any further information.


Greetings
BrightBit

Re: Redefinition of Ogre::TexturePtr while compiling CEGUI

Posted: Thu Aug 29, 2013 11:24
by Kulik
Hi,
this depends on which Ogre version you are using. Ogre changed this part of API between 1.8 and 1.9 and between 1.9 and 2.0. CEGUI should support 1.8 and 1.9, 2.0 support has been fixed but this fix is only in our repository, not in the released 0.8.2.

Which Ogre are you using? What is in your build/cegui/include/CEGUI/Config.h?

Re: Redefinition of Ogre::TexturePtr while compiling CEGUI

Posted: Thu Aug 29, 2013 22:05
by BrightBit
Hi Kulik,

thank you for this hint. I forgot to call hg update v1-9 on my Ogre sources, so CEGUI's config.h looked like this:

Code: Select all

   #ifndef CEGUI_OGRE_VERSION_MAJOR
   #   define CEGUI_OGRE_VERSION_MAJOR 2
   #endif
   #ifndef CEGUI_OGRE_VERSION_MINOR
   #   define CEGUI_OGRE_VERSION_MINOR 0
   #endif
   #ifndef CEGUI_OGRE_VERSION_PATCH
   #   define CEGUI_OGRE_VERSION_PATCH 0
   #endif

...after the update the file looks like this:

Code: Select all

   #ifndef CEGUI_OGRE_VERSION_MAJOR
   #   define CEGUI_OGRE_VERSION_MAJOR 1
   #endif
   #ifndef CEGUI_OGRE_VERSION_MINOR
   #   define CEGUI_OGRE_VERSION_MINOR 9
   #endif
   #ifndef CEGUI_OGRE_VERSION_PATCH
   #   define CEGUI_OGRE_VERSION_PATCH 0


...and it did compile now without errors. Thank you.