Page 1 of 1

[SOLVED] Setting up CEGUI in VC2008

Posted: Sun Feb 03, 2008 02:11
by Browser12
So I'm setting up my project in MSVC++ 2008 express (was in 6.0)
I spent all day getting the libraries all working @_@
I'm using the 0.4.1 version of CEGUI that's tailored to 2005, since I didn't see a 2008.

anywayz, the first problem I'm having is this error message:

Code: Select all

Unhandled exception at 0x7c812a5b in World Writer.exe: Microsoft C++ exception: CEGUI::InvalidRequestException at memory location 0x0012ee58..


The offending code (line that crashes is commented):

Code: Select all

CEGUI::OpenGLRenderer* Renderer = new CEGUI::OpenGLRenderer(0);
new CEGUI::System(Renderer);
CEGUI::SchemeManager::getSingleton().loadScheme("../datafiles/schemes/WindowsLook.scheme"); // THIS IS THE LINE
CEGUI::FontManager::getSingleton().createFont("../datafiles/fonts/Commonwealth-10.font");

System::getSingleton().setDefaultMouseCursor("WindowsLook", "MouseArrow");


The CEGUI.log:

Code: Select all

02/02/2008 20:08:42 (InfL1)   Attempting to load Scheme from file '../datafiles/schemes/WindowsLook.scheme'.
02/02/2008 20:08:42 (Error)   Exception: DefaultResourceProvider::load - ../datafiles/schemes/WindowsLook.scheme does not exist
02/02/2008 20:08:42 (Error)   Scheme::Scheme - loading of Scheme from file '../datafiles/schemes/WindowsLook.scheme' failed.


This is the code I used in 6.0. The thing that's bothering me is that I literally copied the datafiles folder hierarchy from my MSVC 6 project to this 2008 one... so no directories have been changed that I can see..

Any hints? ^^;

Posted: Sun Feb 03, 2008 02:32
by Ivanovich78
Have you tried to put the .scheme file in the main directory of your project?
I'm also using vc 2008 Express ed. My project it's loading gui fine, and log is like this (pay attention to the default datafiles folder)

Code: Select all

03/02/2008 03:25:59 (InfL1)   ---- Scripting module is: None ----
03/02/2008 03:25:59 (InfL1)   Attempting to load Scheme from file '../datafiles/schemes/TaharezLook.scheme'.
03/02/2008 03:26:00 (InfL1)   Attempting to create an Imageset from the information specified in file 'TaharezLook.imageset'.
03/02/2008 03:26:00 (InfL1)   Started creation of Imageset from XML specification:
03/02/2008 03:26:00 (InfL1)   ---- CEGUI Imageset name: TaharezLook
03/02/2008 03:26:00 (InfL1)   ---- Source texture file: TaharezLook.tga in resource group: (Default)
03/02/2008 03:26:00 (InfL1)   ===== Falagard 'root' element: look and feel parsing begins =====
03/02/2008 03:26:00 (InfL1)   ===== Look and feel parsing completed =====
03/02/2008 03:26:00 (InfL1)   No window renderer factories specified for module 'CEGUIFalagardWRBase' - adding all available factories...
03/02/2008 03:26:00 (InfL1)   WindowRendererFactory 'Falagard/Button' added.
03/02/2008 03:26:00 (InfL1)   WindowRendererFactory 'Falagard/Default' added.
03/02/2008 03:26:00 (InfL1)   WindowRendererFactory 'Falagard/Editbox' added.
03/02/2008 03:26:00 (InfL1)   WindowRendererFactory 'Falagard/FrameWindow' added.
03/02/2008 03:26:00 (InfL1)   WindowRendererFactory 'Falagard/ItemEntry' added.

...

03/02/2008 03:26:00 (InfL1)   Started creation of FreeType Font:
03/02/2008 03:26:00 (InfL1)   ---- CEGUI font name: Commonwealth-10
03/02/2008 03:26:00 (InfL1)   ----     Source file: Commonv2c.ttf in resource group: (Default)
03/02/2008 03:26:00 (InfL1)   ---- Real point size: 10
03/02/2008 03:26:00 (InfL1)   Succsessfully loaded 219 glyphs
03/02/2008 03:26:00 (InfL1)   Attempting to create Imageset 'Commonwealth-10_auto_glyph_images_ ' with texture only.
03/02/2008 03:26:00 (InfL1)   ---- Successfully completed loading of GUI layout from '../datafiles/layouts/MainScreen.layout' ----


But when I remove or rename .scheme file from the *main* project folder, the program crash at the line:

Code: Select all

CEGUI::SchemeManager::getSingleton().loadScheme("../datafiles/schemes/TaharezLook.scheme");

So what I'm doing so far it's to put every GUI needed file in the same directory of my project.
The difference is that I'm using 0.5 version of CEGUI.

Posted: Sun Feb 03, 2008 02:44
by Ivanovich78
[EDIT] Posted in a new topic [/EDIT]

Posted: Sun Feb 03, 2008 15:29
by CrazyEddie
You guys should now use the new VC++ 9 packages. See this thread for the announcement.

Also, Browser12 - you should now be able to update to 0.5.0 code (which we actually 'officially' support!).

If you still have issues, we'll be much better placed to help.

CE.