gag, Im such a noob, I didn't realize there are DLLs for the schemes as well, I copied them and its all fixed now.
Im trying to add GUI to my game and CEGUI seemed like the perfect choice.
But I cant get it to work, not even the example code.
Im using SDL with OpenGL.
I get an exception at line that loads the scheme (number 39 of the main func,
the exception text is:
FactoryModule::FactoryModule - Failed to load module 'CEGUITaharezLook_d'.
does anyone know why the exception occurs?
or how can I fix it?
I thought maybe it fails to find the file, so I tried changing all the relative file location to absolute locations (in my code) but it didnt change.
as you can see below, my entire code is copy-pasted from the different tutorials, so I dont think the code is to blame.
I am using .NET 2003 (7.1)
To get it to compile and link I had to:
1) set include/lib dirs for SDL and CEGUI
2) change the code generation MultiThreaded Debug DLL
3) add "SDL.lib SDLmain.lib OpenGLGUIRenderer_d.lib CEGUIBase_d.lib opengl32.lib GLu32.lib GLaux.lib /NODEFAULTLIB:msvcrt.lib" to the linker command line options.
4) copy the SDL.dll and two CEGUI dlls (base and renderer) to the Debug dir.
so, I got it to build but I cant get around that exception.
Code: Select all
int main(int argc, char* argv)
fprintf(stderr, "Unable to initialise SDL: %s", SDL_GetError());
fprintf(stderr, "Unable to set OpenGL videomode: %s", SDL_GetError());
gluPerspective(45.0, 800.0/600.0, 0.1,100.0);
CEGUI::OpenGLRenderer* renderer = new CEGUI::OpenGLRenderer(0,800,600);
// load in the scheme file, which auto-loads the TaharezLook imageset
/****** THIS IS THE EXCEPTION THROWING LINE *******/ CEGUI::SchemeManager::getSingleton().loadScheme("../datafiles/schemes/TaharezLook.scheme");
// load in a font. The first font loaded automatically becomes the default font.
CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton();
CEGUI::Window* myRoot = wmgr.createWindow("DefaultWindow", "root");
CEGUI::FrameWindow* fWnd = (CEGUI::FrameWindow*)wmgr.createWindow("TaharezLook/FrameWindow", "testWindow");
fWnd->setPosition( CEGUI::Point( 0.25f, 0.25f ) );
fWnd->setSize( CEGUI::Size( 0.5f, 0.5f ) );
fWnd->setText( "Hello World!" );
catch (CEGUI::Exception& e)
fprintf(stderr,"CEGUI Exception occured: \n%s\n", e.getMessage().c_str());
// you could quit here
bool must_quit = false;
// get "run-time" in seconds
double last_time_pulse = 0.001*static_cast<double>(SDL_GetTicks());