SFML community forums

Help => Window => Topic started by: orca on August 10, 2012, 04:59:20 am

Title: VideoMode hangs.
Post by: orca 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;
        sf::Sleep(0.5f);
    }

    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?
Title: Re: VideoMode hangs.
Post by: Laurent 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).