I am not sure why a SFML windows does not appear when compiled and executed. I am on ubuntu, downloaded sfml from ubuntu repos. I am assuming ubuntu has the oldest version 1.6, but i am not sure on how to tell. I dont get any error messages when compiling, but no window appears.
I am compiling it via:
g++ -Wall -o "%e" "%f" -lsfml-audio -lsfml-graphics -lsfml-window -lsfml-system
under geany's IDE
#include <SFML/Graphics.hpp>
int main()
{
// Create the main rendering window
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
// Start game loop
while (App.IsOpened())
{
// Process events
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();
}
// Clear the screen (fill it with black color)
App.Clear();
// Display window contents on screen
App.Display();
}
return EXIT_SUCCESS;
}