Hi guys!
So, I try to using CEGUI in SFML (http://www.sfml-dev.org/wiki/en/tutorials/cegui) like in this tutorial, but with the SFML 2.0 (that I had on the SFGUI repositories ^^') and with the latest release of CEGUI (0.7.7).
But when I try to compile, my compiler (GCC 4.6.3 on Ubuntu 12.04) return me this:
terminate called after throwing an instance of 'char const*'
Abandon (core dumped)
I make some test, apparently I haven't any problems with SFML. Here's the minimal code for the error:
#include <iostream>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/System.hpp>
#include <CEGUI/CEGUI.h>
#include <CEGUI/RendererModules/OpenGL/CEGUIOpenGLRenderer.h>
int main(int argc, char* argv[])
{
sf::RenderWindow win(sf::VideoMode(800, 600, 32), "ExceptionTest");
//create an OpenGL renderer and initialize a CEGUI::System object
CEGUI::OpenGLRenderer& myRenderer = CEGUI::OpenGLRenderer::bootstrapSystem();
while(win.isOpen())
{
sf::Event evt;
while(win.pollEvent(evt))
{
switch(evt.type)
{
case sf::Event::Closed:
win.close();
break;
}
}
win.clear();
CEGUI::System::getSingleton().renderGUI();
win.display();
}
return EXIT_SUCCESS;
}
Soo.. hum.. I don't really understand what's happening... hope you can help me!
Thank you! :)
Okay thank you! Yes I wrote:
g++ main.cpp -o myApp -lCEGUIBase -lCEGUIOpenGLRenderer -lSILLY -lsfml-graphics -lsfml-window -lsfml-system
Thank you for your help! :)
EDIT: Oh when I say "when I compile" is when I wrote: ./myApp
because gcc create that file, I'm relatively new with Gnu/Linux so I don't know if "compile" is appropriate at this step...
I'm sorry
EDIT²: I tried to compile de same code (adapted) with SFML 1.6 but I have the same error. I try a apt-get remove gcc and a re-installation but it doesn't change anything. I'll try to compile on Backtrack or on Windows. Anybody knows who can I "repair" gcc? :/
Thank you again!