Problems with DefaultResourceProvider

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

Muffiny
Just popping in
Just popping in
Posts: 2
Joined: Wed Jan 17, 2007 22:43

Problems with DefaultResourceProvider

Postby Muffiny » Thu Jan 18, 2007 15:14

I'm trying to set up the standard directories as is described here:http://www.cegui.org.uk/wiki/index.php/Overview_of_resource_system_enhancements_in_0.5.0

Using the same code:

Code: Select all

CEGUI::DefaultResourceProvider* rp = static_cast<CEGUI::DefaultResourceProvider*>
      (CEGUI::System::getSingleton().getResourceProvider());
                              
   rp->setResourceGroupDirectory("schemes", "../datafiles/schemes/");
   rp->setResourceGroupDirectory("imagesets", "../datafiles/imagesets/");
   rp->setResourceGroupDirectory("fonts", "../datafiles/fonts/");
   rp->setResourceGroupDirectory("layouts", "../datafiles/layouts/");
   rp->setResourceGroupDirectory("looknfeels", "../datafiles/looknfeel/");
   rp->setResourceGroupDirectory("lua_scripts", "../datafiles/lua_scripts/");


This generates several errors when compiling:

Code: Select all

.\Application.cpp(46) : error C2440: 'static_cast' : cannot convert from 'CEGUI::ResourceProvider *' to 'CEGUI::DefaultResourceProvider *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
.\Application.cpp(48) : error C2027: use of undefined type 'CEGUI::DefaultResourceProvider'
        d:\programmer\cegui-sdk-0.5.0b-vc8\include\CEGUIForwardRefs.h(69) : see declaration of 'CEGUI::DefaultResourceProvider'
.\Application.cpp(48) : error C2227: left of '->setResourceGroupDirectory' must point to class/struct/union/generic type


Is it defined in some file I need to include? I looked around and couldn't find anything

EDIT: I'm using 0.5.0b with MSVC++8 Express, if that matters

Muffiny
Just popping in
Just popping in
Posts: 2
Joined: Wed Jan 17, 2007 22:43

Postby Muffiny » Thu Jan 18, 2007 15:22

Yes, CEGUIDefaultResourceProvider.h. I thought I saw it in CEGUI.h

Well don't I feel stupid now :(


Return to “Help”

Who is online

Users browsing this forum: No registered users and 21 guests