I added the library to my ubuntu and I compiled this code:
#include <SFML/System.hpp>
#include <iostream>
int main()
{
sf::Clock Clock;
while (Clock.GetElapsedTime() < 5.f)
{
std::cout << Clock.GetElapsedTime() << std::endl;
sf::Sleep(0.5f);
}
return 0;
}
and everything went well
The next code I will compiling is:
#include <SFML/Window.hpp>
int main()
{
sf::Window oknoAplikacji( sf::VideoMode( 400, 400, 32 ), "Wprowadzenie" );
//sf::Window oknoAplikacji;
//oknoAplikacji.Create( sf::VideoMode( 400, 400, 32 ), "Wprowadzenie", sf::Style::Fullscreen );
while( oknoAplikacji.IsOpened() )
{
oknoAplikacji.Display();
}
return 0;
}
In my terminal I get:
lotnik9o@ubuntu:~/Downloads$ g++ -c 1.cpp
In file included from /usr/local/include/SFML/Window.hpp:40:0,
from 1.cpp:1:
/usr/local/include/SFML/Window/OpenGL.hpp:47:23: fatal error: GL/gl.h: No such file or directory
compilation terminated.
How can I solve the problem?