After upgrading my computer to Windows 7, I'm having trouble getting anything SFML to work. I started a project with SFML 1.6, so I'd like to stick with 1.6 for now. I'm using CodeBlocks, and have followed the configuration procedure in the SFML docs. Any SFML programs that I make, including a simple tutorial program like the following, will compile with no error but then hang up when running.
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/System.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;
}
The executable hangs up, with no explanation whatsoever. No error dialog, nothing. No SFML render windows open or anything. This happens even with saved executables that ran fine on my old XP installation. Given the absence of any error dialogs, I'm at a loss as to what is going on here.