CEGUI::OgreCEGUIRenderer Error ?

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

User avatar
ArKada
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Fri Jan 23, 2009 14:46

CEGUI::OgreCEGUIRenderer Error ?

Postby ArKada » Mon Apr 19, 2010 19:22

Hello everybody!
I hope not to make a mistake by posting here. u_u
I'm using Ogre OIS and CEGUI for a small application in 3D for a project at the end of the semester. The project is progressing well. However, we have to attack the development phase of the GUI.
I get an error from the compiler when I try to compile my application.

Code: Select all

error: ISO C++ forbids declaration of ‘OgreCEGUIRenderer’ with no type


In this line :

Code: Select all

CEGUI::OgreCEGUIRenderer * m_GuiRdr;


But I do not know where its coming from. I enclose the property:

But I do not know where its coming from.
My headers :

Code: Select all

#include <CEGUI/CEGUI.h>
#include <CEGUI/RendererModules/Ogre/CEGUIOgreRenderer.h>


Someone has an idea ?

Greetings

Arkada aka Gouwi

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: CEGUI::OgreCEGUIRenderer Error ?

Postby CrazyEddie » Tue Apr 20, 2010 09:01

In CEGUI 0.7.0 and higher there is no CEGUI::OgreCEGUIRenderer, it has been replaced with a totally new class named CEGUI::OgreRenderer. Also be aware that there are many, many changes from the older CEGUI versions (which appears to be where your information is coming from) and newer CEGUI versions. When in doubt, check the official docs and such here first: http://cegui.oeg.uk/docs/current then, if you didn't already, look at the porting page here: http://www.cegui.org.uk/docs/current/porting6to7.html and if you then have issues search and then post on the forums for specific assistance :)

HTH

CE.

User avatar
ArKada
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Fri Jan 23, 2009 14:46

Re: CEGUI::OgreCEGUIRenderer Error ?

Postby ArKada » Tue Apr 20, 2010 16:48

Thank you very much for the help ! :rofl:
I changed my code through the documentation. The code passes compilation but returns an error performance. :shock:

My code :

Code: Select all

/// Init CEgui ///

CEGUI::OgreRenderer::bootstrapSystem(); // At least this line produces the error

CEGUI::DefaultResourceProvider * rp = static_cast<CEGUI::DefaultResourceProvider*> (CEGUI::System::getSingleton().getResourceProvider());

rp->setResourceGroupDirectory("Schemes",m_Data+"/Schemes/");
rp->setResourceGroupDirectory("Imagesets",m_Data+"/Imagesets/");
rp->setResourceGroupDirectory("Fonts",m_Data+"/Fonts/");
rp->setResourceGroupDirectory("Layouts",m_Data+"/Layouts/");
rp->setResourceGroupDirectory("Looknfeels",m_Data+"/Looknfeel/");
rp->setResourceGroupDirectory("Lua_Scripts",m_Data+"/Lua_Scripts/");

CEGUI::Imageset::setDefaultResourceGroup("Imagesets");
CEGUI::Font::setDefaultResourceGroup("Fonts");
CEGUI::Scheme::setDefaultResourceGroup("Schemes");
CEGUI::WidgetLookManager::setDefaultResourceGroup("Looknfeels");
CEGUI::WindowManager::setDefaultResourceGroup("Layouts");
CEGUI::ScriptModule::setDefaultResourceGroup("Lua_Scripts");

CEGUI::System::getSingleton().setDefaultFont("Commonwealth-10");
CEGUI::System::getSingleton().setDefaultMouseCursor("TaharezLook","MouseArrow");


Code: Select all

virtual bool mouseMoved (const OIS::MouseEvent &arg)
{
         CEGUI::System::getSingleton().injectMouseMove(arg.state.X.rel,arg.state.Y.rel); // At least this line produces the error

        return true;
}


The error :

Code: Select all

*-*-* OGRE Initialising
*-*-* Version 1.7.0 (Cthugha)
Loading library Data/lib/RenderSystem_GL
terminate called after throwing an instance of 'Ogre::InternalErrorException'
  what():  OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library Data/lib/RenderSystem_GL.  System Error: Data/lib/RenderSystem_GL.so: cannot open shared object file: No such file or directory in DynLib::load at /home/gouwi/Ogre/Source/ogre/OgreMain/src/OgreDynLib.cpp (line 91)
Abandon


And I linked the file libCEGUIOgreRenderer-0.7.1.so

Is it serious doctor ? :(

Arkada aka Gouwi

Greetings

User avatar
ArKada
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Fri Jan 23, 2009 14:46

Re: CEGUI::OgreCEGUIRenderer Error ?

Postby ArKada » Wed Apr 21, 2010 05:13

I should mention that when I removed the CEGUI code, prog works fine. 8)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: CEGUI::OgreCEGUIRenderer Error ?

Postby CrazyEddie » Wed Apr 21, 2010 09:09

This code is not correct for use in Ogre:

Code: Select all

CEGUI::DefaultResourceProvider * rp = static_cast<CEGUI::DefaultResourceProvider*> (CEGUI::System::getSingleton().getResourceProvider());

rp->setResourceGroupDirectory("Schemes",m_Data+"/Schemes/");
rp->setResourceGroupDirectory("Imagesets",m_Data+"/Imagesets/");
rp->setResourceGroupDirectory("Fonts",m_Data+"/Fonts/");
rp->setResourceGroupDirectory("Layouts",m_Data+"/Layouts/");
rp->setResourceGroupDirectory("Looknfeels",m_Data+"/Looknfeel/");
rp->setResourceGroupDirectory("Lua_Scripts",m_Data+"/Lua_Scripts/");

We do mention it in the tutorial, though it's not clear enough because a lot of people trip up here ;)

Basically CEGUI with Ogre will normally be using a CEGUI::OgreResourceProvider and not CEGUI::DefaultResourceProvider and it means rather than the code above you should create the resource groups via the Ogre resource mechanisms (with Ogre::ResourceGroupManager::::addResourceLocation or something).

I want to get around to rewriting the tutorials but time is my enemy at the moment ;)

CE.

User avatar
ArKada
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Fri Jan 23, 2009 14:46

Re: CEGUI::OgreCEGUIRenderer Error ?

Postby ArKada » Wed Apr 21, 2010 11:49

Okay thanx ! :D
I will change my code after class. 2 hours of english lessons and 2 hours of Mathematics :(

Test :

I'm sorry but it doesn't change nothing. :?

My application work correctly whitout any CEGUI code, but when i try :

Code: Select all

CEGUI::OgreRenderer::bootstrapSystem();


ONLY this line.

My application crash. :?:

Bye !

Greetings

Arkada

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: CEGUI::OgreCEGUIRenderer Error ?

Postby CrazyEddie » Thu Apr 22, 2010 08:31

ArKada wrote:...when i try :

Code: Select all

CEGUI::OgreRenderer::bootstrapSystem();


ONLY this line.

My application crash. :?:

This doesn't actually mean anything. We can't know what the issue might be from just saying "it's crashed". Is it a processor exception? A C++ exception? Did you try catching the exception and outputting any message?

CE

User avatar
ArKada
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Fri Jan 23, 2009 14:46

Re: CEGUI::OgreCEGUIRenderer Error ?

Postby ArKada » Thu Apr 22, 2010 09:42

Sorry ... :roll:
The crash report the same error as before :

*-*-* OGRE Initialising
*-*-* Version 1.7.0 (Cthugha)
Loading library Data/lib/RenderSystem_GL
terminate called after throwing an instance of 'Ogre::InternalErrorException'
what(): OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library Data/lib/RenderSystem_GL. System Error: Data/lib/RenderSystem_GL.so: cannot open shared object file: No such file or directory in DynLib::load at /home/gouwi/Ogre/Source/ogre/OgreMain/src/OgreDynLib.cpp (line 91)
Abandon

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: CEGUI::OgreCEGUIRenderer Error ?

Postby CrazyEddie » Fri Apr 23, 2010 08:36

Hi,

So is that the only CEGUI line you have? What does your code look like now as opposed to how it looked earlier? Is CEGUI.log created, if so, what's in there? Is it possible to get a debug call stack at the point of the exception?

I'm having some trouble getting my head around the issue, basically the error appears to be coming from Ogre, and initialisation of the Ogre render system should occur before the CEGUI system is initialised - so if you have things in the correct sequence, this is most bizarre.

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 5 guests