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

Author Topic: VideoMode hangs.  (Read 1086 times)

0 Members and 1 Guest are viewing this topic.


  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
VideoMode hangs.
« on: August 10, 2012, 04:59:20 am »
I've just installed SFML and trying to run "Tutorial - Graphics - Using render windows".
The problem is that nothing happens - the program just hangs without any output or errors...

BTW i tried this example and it DOES WORK AS EXPECTED (shows the clock elapsed time for 5s):
#include <SFML/System.hpp>
#include <iostream>

int main()
    sf::Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
        std::cout << Clock.GetElapsedTime() << std::endl;

    return 0;

Here is the minimal code to recreate my problem (doesn't get more minimal than this...):
#include <SFML/Window.hpp>
int main()
    sf::VideoMode(800, 600);
    return EXIT_SUCCESS;

I'm using Windows 7 64bit, IDE is CDT with MinGW, gcc version 4.6.2.
Just FYI i don't have any computer problems (that i know of)...

This is the build command (success with no errors)
g++ -DSFML_DYNAMIC "-ID:\\workspace\\Radiosity\\SFML-1.6\\include" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\Radiosity.o" "..\\src\\Radiosity.cpp"
g++ "-LD:\\workspace\\Radiosity\\SFML-1.6\\lib" -o Radiosity.exe "src\\Radiosity.o" -lsfml-system-d -lsfml-graphics-d -lsfml-window-d

I've tried the release target (with normal libs), I've tried running the .exe manually, I've tried rebooting... same results.

Any ideas?


  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: VideoMode hangs.
« Reply #1 on: August 10, 2012, 08:08:41 am »
You must probably recompile SFML. And by the way, you should switch to SFML 2 (which has precompiled packages compatible with gcc 4.6).
Laurent Gomila - SFML developer