[SOLVED] Redefinition of Ogre::TexturePtr while compiling

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

User avatar
BrightBit
Not too shy to talk
Not too shy to talk
Posts: 35
Joined: Mon May 30, 2011 03:30
Contact:

[SOLVED] Redefinition of Ogre::TexturePtr while compiling

Postby BrightBit » Wed Aug 28, 2013 21:54

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
Last edited by BrightBit on Thu Aug 29, 2013 22:05, edited 1 time in total.
"Yeah so if you ever need info about anyone [...] Just ask. [...] They 'trust me'. Dumb fucks." - Mark Zuckerberg (Facebook CEO)

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

Re: Redefinition of Ogre::TexturePtr while compiling CEGUI

Postby Kulik » Thu Aug 29, 2013 11:24

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?

User avatar
BrightBit
Not too shy to talk
Not too shy to talk
Posts: 35
Joined: Mon May 30, 2011 03:30
Contact:

Re: Redefinition of Ogre::TexturePtr while compiling CEGUI

Postby BrightBit » Thu Aug 29, 2013 22:05

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.
"Yeah so if you ever need info about anyone [...] Just ask. [...] They 'trust me'. Dumb fucks." - Mark Zuckerberg (Facebook CEO)


Return to “Help”

Who is online

Users browsing this forum: No registered users and 10 guests