[Solved] Problem after building CEGUI for ogre

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

Solringolt
Just popping in
Just popping in
Posts: 9
Joined: Tue Apr 15, 2014 11:56

[Solved] Problem after building CEGUI for ogre

Postby Solringolt » Tue Apr 15, 2014 12:58

Hi all,
I'm facing a problem, after I build in visual studio and I add the linkers to my project. I wanted to add the CEGUIOgreRenderer-0.dll like mentioned in
http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Basic+Tutorial+7&structure=Tutorials#Windows_Settings this tutorial but the file has not build... I think that's why i get the error

Code: Select all

"c:\cegui\cegui-0.8.2\cegui\include\cegui\renderermodules\ogre\renderer.h(57): error C2371: 'Ogre::TexturePtr' : redefinition ; base type different
when debbuging my project..
But how can i resolve this?

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

Re: Problem after building CEGUI for ogre

Postby Ident » Tue Apr 15, 2014 17:13

Use the search function:
viewtopic.php?f=10&t=6552&p=30585&hilit=TexturePtr#p30585

Fixed in v0-8 branch of CEGUI. Not released yet. I recommend you to use v0-8 branch, it is stable.
CrazyEddie: "I don't like GUIs"

Solringolt
Just popping in
Just popping in
Posts: 9
Joined: Tue Apr 15, 2014 11:56

Re: [Solved] Problem after building CEGUI for ogre

Postby Solringolt » Tue Apr 15, 2014 18:14

Thx for your quick answer I'm using cegui v0.8.2 but my config.h doesn't have any info about version of ogre... here is my config.h:

Code: Select all

/***********************************************************************
    filename:   CEGUIConfig.h
    created:    Mon Jan 10 2011
    author:     Paul D Turner <paul@cegui.org.uk>
*************************************************************************/
/***************************************************************************
 *   Copyright (C) 2004 - 2011 Paul D Turner & The CEGUI Development Team
 *
 *   Permission is hereby granted, free of charge, to any person obtaining
 *   a copy of this software and associated documentation files (the
 *   "Software"), to deal in the Software without restriction, including
 *   without limitation the rights to use, copy, modify, merge, publish,
 *   distribute, sublicense, and/or sell copies of the Software, and to
 *   permit persons to whom the Software is furnished to do so, subject to
 *   the following conditions:
 *
 *   The above copyright notice and this permission notice shall be
 *   included in all copies or substantial portions of the Software.
 *
 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
 *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *   OTHER DEALINGS IN THE SOFTWARE.
 ***************************************************************************/
//////////////////////////////////////////////////////////////////////////
/*************************************************************************

This file is automatically generated by CMake and should be changed by
setting CMake options and regenerating, rather than editing directly.

*************************************************************************/
//////////////////////////////////////////////////////////////////////////
#ifndef _CEGUIConfig_h_
#define _CEGUIConfig_h_

// CMake defines NDEBUG on all platforms, but not always DEBUG :-/
#if !defined(NDEBUG) && !defined(DEBUG)
#   define DEBUG 1
#endif

#define CEGUI_HAS_BUILD_SUFFIX
#ifdef CEGUI_HAS_BUILD_SUFFIX
#   ifndef CEGUI_BUILD_SUFFIX
#       if defined(DEBUG) || defined(_DEBUG)
#           define CEGUI_BUILD_SUFFIX "_d"
#       else
#           define CEGUI_BUILD_SUFFIX ""
#       endif
#   endif
#endif

//////////////////////////////////////////////////////////////////////////
// CEGUI supports custom memory allocation (optional)
//////////////////////////////////////////////////////////////////////////
// if this is defined, allocation can be customised
/* #undef CEGUI_CUSTOM_ALLOCATORS */
// if this is defined, allocations will pass debug info to allocators
/* #undef CEGUI_CUSTOM_ALLOCATORS_DEBUG */
// the file that contains allocators and allocation config
// (not used if CEGUI_CUSTOM_ALLOCATORS isn't defined)
#define CEGUI_CUSTOM_ALLOCATORS_INCLUDE "CEGUI/MemoryStdAllocator.h"

//////////////////////////////////////////////////////////////////////////
// CEGUI allows 3 different string class configurations
//////////////////////////////////////////////////////////////////////////
// Inbuilt Unicode (utf8 and utf32 aware)
#define CEGUI_STRING_CLASS_UNICODE 1
// plain std::string without allocators (makes pass by reference easy)
#define CEGUI_STRING_CLASS_STD 2
// std::basic_string allocated according to allocator config
#define CEGUI_STRING_CLASS_STD_AO 3

#define CEGUI_STRING_CLASS 1

//////////////////////////////////////////////////////////////////////////
// Set this to the default XMLParser to be used.
//////////////////////////////////////////////////////////////////////////
#ifndef CEGUI_DEFAULT_XMLPARSER
#   define CEGUI_DEFAULT_XMLPARSER ExpatParser
#endif

//////////////////////////////////////////////////////////////////////////
// Set this to the default ImageCodec to be used.
//////////////////////////////////////////////////////////////////////////
#ifndef CEGUI_DEFAULT_IMAGE_CODEC
#   define CEGUI_DEFAULT_IMAGE_CODEC SILLYImageCodec
#endif

//////////////////////////////////////////////////////////////////////////
// The following says which TinyXML api version has been found
//////////////////////////////////////////////////////////////////////////
/* #undef CEGUI_TINYXML_HAS_2_6_API */

//////////////////////////////////////////////////////////////////////////
// The following controls the version of Lua that is going to be used.
// Note that from 0.7.0 and up, Lua 5.0 is no longer supported.
// 51 is for Lua 5.1.x versions (and above?)
//////////////////////////////////////////////////////////////////////////
#ifndef CEGUI_LUA_VER
#   define CEGUI_LUA_VER 51
#endif

#ifndef CEGUI_IRR_SDK_VERSION
#   define CEGUI_IRR_SDK_VERSION 16
#endif

//////////////////////////////////////////////////////////////////////////
// The following controls whether freetype based font support will be
// compiled in (default).  If you want to build CEGUI /without/ freetype
// support, comment the following line.
//////////////////////////////////////////////////////////////////////////
#define CEGUI_HAS_FREETYPE

//////////////////////////////////////////////////////////////////////////
// PCRE library
// CEGUI uses the pcre library for it's regular expression based string
// validation as used in the Editbox (and derived classes, such as Spinner).
// To disable the use of PCRE (and therefore the validation factilities),
// comment the following line.  (Attempts to set validation string will throw).
//////////////////////////////////////////////////////////////////////////
#define CEGUI_HAS_PCRE_REGEX

//////////////////////////////////////////////////////////////////////////
// The following controls whether the default logger be (possibly) used.
// If you want to build CEGUI so that it does not use the default logger,
// comment the following line.
//
// Note: If you disable the default logger you MUST provide an alternative
// CEGUI::Logger based class and instantiate it before creating the main
// CEGUI::System object.
//////////////////////////////////////////////////////////////////////////
#define CEGUI_HAS_DEFAULT_LOGGER

//////////////////////////////////////////////////////////////////////////
// The following defines control bidirectional text support.
//
// Uncomment the CEGUI_BIDI_SUPPORT definition to enable bidirectional
// text in CEGUI.
//
// With bidirectional text support enabled, you must then choose to uncomment
// either the CEGUI_USE_MINIBIDI or CEGUI_USE_FRIBIDI definitions (but you
// should not uncomment both!)
//
// Uncommenting CEGUI_USE_MINIBIDI uses an integrated copy of minibidi to
// provide the bidirectional support.
//
// Uncommenting CEGUI_USE_FRIBIDI uses an external copy of fribidi to
// provide the bidirectional support (not supplied).
//////////////////////////////////////////////////////////////////////////
/* #undef CEGUI_BIDI_SUPPORT */

// Uncomment this to use the embedded minibidi library.
/* #undef CEGUI_USE_MINIBIDI */
// - or -
// Uncomment this to use an external fribidi library.
/* #undef CEGUI_USE_FRIBIDI */

//////////////////////////////////////////////////////////////////////////
// The following controls whether the MinizipResourceProvider will be
// built into the CEGUIBase library.  You can uncomment the following line
// to include this code (and it's dependency code).
//
// The MinizipResourceProvider provides the ability to load resource files
// from locations within .zip files.
//////////////////////////////////////////////////////////////////////////
/* #undef CEGUI_HAS_MINIZIP_RESOURCE_PROVIDER */

// Define the default place where cegui will look for loadable modules
// this can be changed at runtime via the CEGUI_MODULE_DIR environment var.
#if defined(_WIN32) || defined(__WIN32__)
#   define CEGUI_MODULE_DIR "C:/CEGUI/cegui-0.8.2/build/bin/"
#else
#   define CEGUI_MODULE_DIR "C:/Program Files (x86)/cegui/lib/cegui-0.8/"
#endif

// This is defined when iconv is expecting a const char** and not a char**
// as type for its inbuf parameter. This is only used when building cegui
// itself, and likely will not be useful externally.
/* #undef CEGUI_ICONV_USES_CONST_INBUF */

#endif   // end of guard _CEGUIConfig_h_



Waht should I do now?

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

Re: [Solved] Problem after building CEGUI for ogre

Postby Ident » Tue Apr 15, 2014 19:55

The thread says the bug was fixed in 0.8.3.

Since there are only fixes and no major changes between 0.8.X versions, i recommend you to just update to this version. Be sure to entirely remove all references to 0.8.2 files first or replacing all the files entirely with 0.8.3 files, so you can be sure you do not mix versions. Mixed version usage will lead to serious issues once u build or run your program. For example having 0.8.2 includes and 0.8.3 libs...
CrazyEddie: "I don't like GUIs"

Solringolt
Just popping in
Just popping in
Posts: 9
Joined: Tue Apr 15, 2014 11:56

Re: [Solved] Problem after building CEGUI for ogre

Postby Solringolt » Wed Apr 16, 2014 06:57

Thx you for your answer it partially solved my problem! I still have a problem when building ogreRenderer, that's why I don't have the dll CEGUIOgreRenderer-0.dll needed for launching my project.. Any idea why it doesn't build? Here is an image with some of the errors, if you need more information tell me!
Image

User avatar
mmixLinus
Quite a regular
Quite a regular
Posts: 71
Joined: Fri May 20, 2011 08:46
Location: Lund, Sweden
Contact:

Re: [Solved] Problem after building CEGUI for ogre

Postby mmixLinus » Wed Apr 16, 2014 09:12

Hi,
the errors you've attached are related to the final linking of the project. You should start off by fixing the OgreRenderer build problems, and maybe post some of those errors instead (fix early errors first). As you've marked the original problem as Solved, you should probably start a new thread for the new problem (good conduct :))
/mmixLinus
MMiX.Me 3D Music Player
Galaxy Navigator 3D - 2 million stars (ESA's Gaia satellite)
(YouTube|Facebook)

Solringolt
Just popping in
Just popping in
Posts: 9
Joined: Tue Apr 15, 2014 11:56

Re: [Solved] Problem after building CEGUI for ogre

Postby Solringolt » Wed Apr 16, 2014 09:43

I will do a second subject but this is the beginning of my problem! It's only the build of CEGUIOGreRenderer... The cmake went well and when I build i get the errors...

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

Re: [Solved] Problem after building CEGUI for ogre

Postby Ident » Wed Apr 16, 2014 12:05

Your Ogre libs are not linked to your OgreRenderer for some reason. Check your OgreRenderer linker settings to see if OgreMain is linked.
CrazyEddie: "I don't like GUIs"

Solringolt
Just popping in
Just popping in
Posts: 9
Joined: Tue Apr 15, 2014 11:56

Re: [Solved] Problem after building CEGUI for ogre

Postby Solringolt » Wed Apr 16, 2014 13:20

Ok so I added manually OgreMain.lib fullpath in the dependances and now I have only 15 errors left, I think it's the right way XD
http://imageshack.com/a/img856/6430/xtr3.png


These are the included lib I know have do I need any more?

Code: Select all

kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
..\..\..\..\lib\CEGUIBase-0_d.lib
C:\OgreSDK_vc11_v1-9-0\lib\debug\OgreMain_d.lib
C:\OgreSDK_vc11_v1-9-0\lib\debug\OgreOverlay_d.lib
C:\OgreSDK_vc11_v1-9-0\lib\debug\OIS_d.lib

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

Re: [Solved] Problem after building CEGUI for ogre

Postby Ident » Wed Apr 16, 2014 14:27

Please copy your errors into some sort of log or paste it here in Code brackets. Screenshots are useless for people searching for those error messages.

Now you are not adding the cegui libs to your project. please be sure to add the debug libs for debug config and release libs for release config ALWAYS.
As you apparently do not know what you need to link to your project, i suggest you look at the samplebrowsers project configuration and compare the includes and libs used.
CrazyEddie: "I don't like GUIs"


Return to “Help”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 17 guests