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

Author Topic: Problem with window  (Read 1952 times)

0 Members and 1 Guest are viewing this topic.

Farkraj

  • Newbie
  • *
  • Posts: 5
    • View Profile
Problem with window
« on: October 10, 2011, 03:08:44 pm »
Hi guys. I just installed SFML into my Code::Blocks, linked everything and include all i need but... after compile a simple program my window just does not appear! In SDL everything worked fine so its not problem with my system or somethin like this ;p

Here is the code:
Code: [Select]

#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <iostream>
#include <fstream>

using namespace std;
int main()
{
    // Create the main window
    sf::RenderWindow App(sf::VideoMode(640, 480, 32), "SFML Window");

    sf::Event Event;

    while(App.IsOpened())
    {
      while(App.GetEvent(Event))
      {
        if(Event.Type == sf::Event::Closed)
        {
            App.Close();
        }

      }

      App.Clear();

      App.Display();


    }

    return EXIT_SUCCESS;

}



Everything is compling without problems, but after run i see only console but no window at all :/ Maby its something with my mingw? i don't have any clue because its my first time with this lib. Help me please ;p

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Problem with window
« Reply #1 on: October 10, 2011, 03:26:48 pm »
If you use SFML 1.6 and an ATI graphisc card, it's a known bug.
Laurent Gomila - SFML developer

Farkraj

  • Newbie
  • *
  • Posts: 5
    • View Profile
Problem with window
« Reply #2 on: October 10, 2011, 03:30:40 pm »
Yep, i use ATI card and 1.6, is there any solution? Or i have to wait for newer version or use older one ?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Problem with window
« Reply #3 on: October 10, 2011, 03:58:47 pm »
You can link to SFML statically, this is the easiest solution.

You can also switch to the current development version of SFML 2, which is very close to being publicly released.
Laurent Gomila - SFML developer