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

Author Topic: SFML window won't show  (Read 3680 times)

0 Members and 1 Guest are viewing this topic.

Hundrea

  • Newbie
  • *
  • Posts: 15
    • View Profile
SFML window won't show
« 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   
This happens when i try other code that makes a window
« Last Edit: February 16, 2013, 08:57:07 am by Laurent »

cire

  • Full Member
  • ***
  • Posts: 138
    • View Profile

Hundrea

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: SFML won't window won't show
« Reply #2 on: February 16, 2013, 04:40:48 am »
i also tryed changing it to gui applicaityon but the same error appears

Hundrea

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: SFML won't window won't show
« Reply #3 on: February 16, 2013, 04:53:13 am »
the version of my gcc is 4.7 exactly

Hundrea

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: SFML won't window won't show
« Reply #4 on: February 16, 2013, 05:17:02 am »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
AW: Re: SFML won't window won't show
« Reply #5 on: February 16, 2013, 06:05:40 am »
the version of my gcc is 4.7 exactly
You need to recompile SFML then.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Hundrea

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: SFML window won't show
« Reply #6 on: February 16, 2013, 09:28:07 pm »
thanks it works now

 

anything