Ogre 3d and cegui runtime error

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

JohnBoyMan
Just popping in
Just popping in
Posts: 16
Joined: Thu Aug 25, 2011 21:51

Ogre 3d and cegui runtime error

Postby JohnBoyMan » Fri Jul 04, 2014 00:22

Hello i am trying to get cegui 0.8.3 to work with ogre. I have added the CEGUIBase-0_d.lib; to my compilers additional dependencies. I have also added the path to the CEGUI inclue file for all of the headers like CEGUI.h. I have also added #include "cegui.h" to the top of my project.

I wrote this code into the CreateScene() of my game.

Code: Select all


         WindowManager& winMgr = WindowManager::getSingleton();
 
         Window* myRoot = winMgr.createWindow( "DefaultWindow", "root" );
         System::getSingleton().getDefaultGUIContext().setRootWindow( myRoot );

         FrameWindow* fWnd = static_cast<FrameWindow*>(
         winMgr.createWindow( "TaharezLook/FrameWindow", "testWindow" ));

         myRoot->addChild( fWnd );

         position a quarter of the way in from the top-left of parent.
         fWnd->setPosition( UVector2( UDim( 0.25f, 0.0f ), UDim( 0.25f, 0.0f ) ) );
          set size to be half the size of the parent
         fWnd->setSize( USize( UDim( 0.5f, 0.0f ), UDim( 0.5f, 0.0f ) ) );

         fWnd->setText( "Hello World!" );




This error message pops up during early runtime of my ogre application.


Assertion Failed!
Program: ...dio 2012\Projects\game2014\Debug\CEGUIBase-0_d.dll
File:C:\Users\john\Desktop\New Folder (5)\cegui.../Singleton.h
Line:79

Expression: ms_Singleton

For more information on how you program can cause an assertion
failure,see the Visual C++ documentation on asserts

(Press Retry to debug the application - JIT must be enabled)



there are no errors reported in my debugger.

does anyone know the cause of this? thanks

User avatar
Nickenstein79
Quite a regular
Quite a regular
Posts: 93
Joined: Thu May 09, 2013 06:19

Re: Ogre 3d and cegui runtime error

Postby Nickenstein79 » Fri Jul 04, 2014 02:41

You will need to place the CEGUI dlls that you built into the folder that your game.exe lives in. (Your game is linking correctly with the CEGUI.libs, but still requires the runtime DLLs that you built.)

files like:

CEGUIBase-0.dll
CEGUIOgreRenderer-0.dll
CEGUISILLYImageCodec.dll

etc...


Also, you will want to put debug versions in there if you want to debug CEGUI. They have '_d' in the name (Example: CEGUIBase-0_d.dll).
(Your debugger will have an easier time showing proper debug info if you also copy the corresponding *.pdb and *.ilk files)

THEN...

Those CEGUI-dlls in-turn are going to rely on some of the CEGUI-dependencies dlls, (Glew.dll, FreeType.dll, LibExpat.dll, and so on...) so they will need to be in the folder with your game.exe too.

JohnBoyMan
Just popping in
Just popping in
Posts: 16
Joined: Thu Aug 25, 2011 21:51

Re: Ogre 3d and cegui runtime error

Postby JohnBoyMan » Fri Jul 04, 2014 04:31

thanks does ogre still use.
CEGUIOgreRenderer-0.dll

I cant find it in my cegui dependencies or in cegui.
cant find either of these
CEGUIOgreRenderer-0.dll
CEGUISILLYImageCodec.dll

User avatar
Nickenstein79
Quite a regular
Quite a regular
Posts: 93
Joined: Thu May 09, 2013 06:19

Re: Ogre 3d and cegui runtime error

Postby Nickenstein79 » Fri Jul 04, 2014 04:55

JohnBoyMan wrote:cant find either of these
CEGUIOgreRenderer-0.dll
CEGUISILLYImageCodec.dll


Those are optional things that you have to toggle-ON in the cmake settings of CEGUI if you want your cegui.sln to build them. (The DLL files for these will end up in the /bin folder of your CEGUI-build folder if you are building them).

Make sure that the following cmake variables are toggle-ON.
CEGUI_BUILD_RENDERER_OGRE
CEGUI_BUILD_IMAGECODEC_SILLY (This is needed for CEGUI to be able to load most texture/image formats.)

In my setup I have all of the directX/Opengl/Ogre Renderers toggled-ON (Except for OpenGLES/Irlicht as I don't need/use those).

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

Re: Ogre 3d and cegui runtime error

Postby Ident » Fri Jul 04, 2014 07:03

CrazyEddie: "I don't like GUIs"


Return to “Help”

Who is online

Users browsing this forum: No registered users and 19 guests