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.