Hello,
I've been trying to make a simple sf::Window from the tutorial (both SFML 1.6 and SFML 2.0 give the same error).
Here is the code (exactly the 2.0 test code):
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(300, 200), "SFML works!");
sf::Text text("Hello SFML");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(text);
window.display();
}
return 0;
}
And here is the output:
$g++ -c test.cpp
In file included from /usr/local/include/SFML/Window.hpp:40:0,
from /usr/local/include/SFML/Graphics.hpp:32,
from test.cpp:1:
/usr/local/include/SFML/Window/OpenGL.hpp:47:23: fatal error: GL/gl.h: No such file or directory
compilation terminated.
I am using Ubuntu 11.10 32-Bit.
A side question, how do I reinstall SFML and how do I uninstall SFML?