Welcome to SFML then!
Btw if you're posting code, you should make use of the code=cpp tag and not use a quote.
Could you try this a bit better example? If you don't process events Windows will flag your application as dead after 5 seconds or so.
#include <SFML/Graphics.hpp>
int main()
{
// Create the main window
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.display();
}
}
What exact version of SFML are you using, i.e. where did you get it from?
What's your compilers version?
If it's >= 4.7.x then you'll have to recompile SFML or use my Nightly Builds.