Hi, im on linux and im having some problems building my application and linking with sfml properly:
I have a file, main.cpp, that contains the following code:
#include <SFML/Window.hpp>
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(800,600), "window");
sf::Event event;
while(window.pollEvent(event))
{
if(event.type == sf::Event::Closed)
window.close();
}
window.display();
return 0;
}
When i built & run it using the following command:
g++ main.cpp -lsfml-window -lsfml-system -lsfml-graphics -lsfml-audio -lsfml-network
./a.out
it doesn't show a window, instead it just prints:
Setting vertical sync not supported
Does anyone know whats happening?
(I installed sfml using the following command: apt install libsfml-dev)