Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Setting vertical sync not supported  (Read 4944 times)

0 Members and 1 Guest are viewing this topic.

stav

  • Newbie
  • *
  • Posts: 10
    • View Profile
Setting vertical sync not supported
« on: June 02, 2018, 10:54:14 pm »
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:
Code: [Select]
Setting vertical sync not supported

Does anyone know whats happening?

(I installed sfml using the following command: apt install libsfml-dev)