This issue came up for me because the SFML wizard appears to be out of date and fails to compile. An updated main.cpp that compiles with SFML 2.0 is:
#include <SFML/Graphics.hpp>
int main()
{
// Create the main window
sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window");
// Load a sprite to display
sf::Texture Texture;
if (!Texture.loadFromFile("cb.bmp"))
return EXIT_FAILURE;
sf::Sprite Sprite(Texture);
// Start the game loop
while (App.isOpen())
{
// Process events
sf::Event Event;
while (App.pollEvent(Event))
{
// Close window : exit
if (Event.type == sf::Event::Closed)
App.close();
}
// Clear screen
App.clear();
// Draw the sprite
App.draw(Sprite);
// Update the window
App.display();
}
return EXIT_SUCCESS;
}