Page 1 of 1

[SOLVED] Irrlicht 1.8 + CEGUI Mercurial Version

Posted: Mon Jan 07, 2013 16:51
by Vader
Hi,

I want to use CEGUI with Irrlicht 1.8.
Unfortunately i get an error and the program crashes when I set up the renderer with

Code: Select all

CEGUIRenderer = &CEGUI::IrrlichtRenderer::bootstrapSystem(*device);


My whole test code is:

Code: Select all

#include <irrlicht.h>
#include <iostream>

#include <CEGUI/CEGUI.h>
#include <CEGUI/RendererModules/Irrlicht/Renderer.h>

using namespace CEGUI;

using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

int main()
{

   IrrlichtDevice *device = createDevice(video::EDT_SOFTWARE, core::dimension2d<u32>(600, 400), 32, false, false, false, 0);

   IVideoDriver* driver = device->getVideoDriver();
   ISceneManager* smgr = device->getSceneManager();
   IGUIEnvironment* guienv = device->getGUIEnvironment();

   CEGUI::IrrlichtRenderer*  CEGUIRenderer;
   std::cout << device->getVersion() << std::endl;
   CEGUIRenderer = &CEGUI::IrrlichtRenderer::bootstrapSystem(*device);

   while(device->run())
   {

      driver->beginScene(true, true, SColor(255,42,42,42));
      smgr->drawAll();
      guienv->drawAll();
      driver->endScene();

   }

   device->drop();
   return 0;

}


The error meassage when the program crashes is:
CEGUI::GenericException in function 'CEGUI::DynamicModule::DynamicModule(const CEGUI::String&)' (C:\CPPLibs\CEGUI-Merc\cegui\src\DynamicModule.cpp:126) : Failed to load module 'libCEGUI.dll': Unknown Error

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
terminate called after throwing an instance of 'CEGUI::GenericException'
what(): CEGUI::GenericException in function 'CEGUI::DynamicModule::DynamicModule(const CEGUI::String&)' (C:\CPPLibs\CEGUI-Merc\cegui\src\DynamicModule.cpp:126) : Failed to load module 'libCEGUI.dll': Unknown Error


I link to the libraries Irrlicht, CEGUIIrrlichtRenderer and CEGUIBase, but I don't see a library called libCEGUI (like in the error message) :? Do I need more libraries? Can anybody help me please?
My compiler is MinGW on Windows 7 64 bit and I use the CEGUI code I downloaded with Mercurial. I also tried the CEGUI 0.7.5 MinGW binaries and it also crashes.

Re: Irrlicht 1.8 + CEGUI Mercurial Version

Posted: Tue Jan 08, 2013 09:20
by CrazyEddie
The specific issue is likely that the default XML parser is set to the empty string - perhps because none of the parsers were going to be built? The same can happen with ImageCodec modules, so it could be that, but I thnk that would happen a bit later on. You need to check your build configuration, check your cmake options, check you have the dependencies for the modules you intend to use and check that cmake is picking these up (or set their locations explicitly) and check that the CEGUI_DEFAULT_* cmake vars for the default XMLParser and default ImageCodec are set to something sane.

But more importantly than any of the above, you should be aware there is currently an issue with Irrlicht that results in no rendering showing up (http://www.cegui.org.uk/mantis/view.php?id=845). I'm also not sure if CEGUI works with the software driver for irrlicht :?

CE.

Re: Irrlicht 1.8 + CEGUI Mercurial Version

Posted: Tue Jan 08, 2013 19:35
by Vader
OK, thank you. Sounds like I should not waste my time with Irrlicht + CEGUI. I am going to take a look at OGRE. :)

Re: Irrlicht 1.8 + CEGUI Mercurial Version

Posted: Fri Feb 28, 2014 01:07
by franzbischoff
Hi!

I've got the same error "Failed to load module 'libCEGUI.dll': Unknown Error" and I found out that I missed to set Expat as the default XML parser.

After re-run cmake to fix it, it worked.

But my question is, how can I fix this without cmake? I have a project manually set and I'm missing some #define or something to set Expat as default XML parser? Do I need to link it to another lib?

Thank you.

Re: Irrlicht 1.8 + CEGUI Mercurial Version

Posted: Fri Feb 28, 2014 11:59
by franzbischoff
Ok, just found out that cmake generates 3 files: Config.h, Version.h and ModuleConfig.h.

Just copied that and it works :) :hammer:

Re: [SOLVED] Irrlicht 1.8 + CEGUI Mercurial Version

Posted: Sat Mar 01, 2014 02:10
by Ident
Good that you solved it, thanks for posting the solution for others.