SFML community forums

Help => Window => Topic started by: Hundrea on February 16, 2013, 04:17:54 am

Title: SFML window won't show
Post by: Hundrea on February 16, 2013, 04:17:54 am
I recently tryed to using SFML with code block using http://www.sfml-dev.org/tutorials/2.0/start-cb.php
When i try to use the code :
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}
All i get is   (http://i.imgur.com/NQhl1ji.png)
This happens when i try other code that makes a window
Title: Re: SFML won't window won't show
Post by: cire on February 16, 2013, 04:32:38 am
http://en.sfml-dev.org/forums/index.php?topic=10366.msg71363#msg71363
Title: Re: SFML won't window won't show
Post by: Hundrea on February 16, 2013, 04:40:48 am
i also tryed changing it to gui applicaityon but the same error appears
Title: Re: SFML won't window won't show
Post by: Hundrea on February 16, 2013, 04:53:13 am
the version of my gcc is 4.7 exactly
Title: Re: SFML won't window won't show
Post by: Hundrea on February 16, 2013, 05:17:02 am
http://i.imgur.com/LnTN7wR.png (http://i.imgur.com/LnTN7wR.png)
Title: AW: Re: SFML won't window won't show
Post by: eXpl0it3r on February 16, 2013, 06:05:40 am
the version of my gcc is 4.7 exactly
You need to recompile SFML then.
Title: Re: SFML window won't show
Post by: Hundrea on February 16, 2013, 09:28:07 pm
thanks it works now