Failed to load module exception. <-- fixed

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

Just popping in
Just popping in
Posts: 3
Joined: Mon Feb 13, 2006 00:11

Failed to load module exception. <-- fixed

Postby Iftah » Mon Feb 13, 2006 00:46

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[])
   if (SDL_Init(SDL_INIT_VIDEO)<0)
      fprintf(stderr, "Unable to initialise SDL: %s", SDL_GetError());

   if (SDL_SetVideoMode(800,600,0,SDL_OPENGL)==NULL)
      fprintf(stderr, "Unable to set OpenGL videomode: %s", SDL_GetError());

   glViewport(0,0, 800,600);

   gluPerspective(45.0, 800.0/600.0, 0.1,100.0);


      CEGUI::OpenGLRenderer* renderer = new CEGUI::OpenGLRenderer(0,800,600);
      new CEGUI::System(renderer);


      // 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::System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow");

      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());
   while (!must_quit)
   return 0;


Return to “Help”

Who is online

Users browsing this forum: No registered users and 8 guests