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

Author Topic: window is closing  (Read 2036 times)

0 Members and 1 Guest are viewing this topic.

majky358

  • Newbie
  • *
  • Posts: 3
    • View Profile
window is closing
« on: December 22, 2011, 07:20:18 pm »
Hi, i have downloaded SFML 1.6 for Windows, i use it on Visual 2008 Express version, after hour or 2 hours i have setted all setting which are needed to compile and debug my code without erorrs (dll probs etc..). Now i am trying code like only for render window like this:

Code: [Select]
01 #include <SFML/Graphics.hpp>
02
03 int main()
04 {
05    sf::VideoMode VMode(800, 600, 32);
06    sf::RenderWindow Window(VMode, "SFMLCoder Tutorial - Empty Window");
07
08    while (Window.IsOpened())
09    {
10        sf::Event Event;
11        while (Window.PollEvent(Event))
12        {
13            switch (Event.Type)
14            {
15            case sf::Event::Closed:
16                Window.Close();
17                break;
18            default:
19                break;
20            }
21        }
22
23        Window.Clear(sf::Color(0, 255, 255));
24        Window.Display();
25    }
26
27    return 0;
28 }
 (without numbers :) )

And my problem is, when i compile and get debug / run, my application window open only for 0,1 second, after this there is opened only console window. I tried a lot of options but i am still not successfull. I tried run .exe file but the same result. Thnks for advice.

Turbine

  • Full Member
  • ***
  • Posts: 100
    • View Profile
window is closing
« Reply #1 on: December 23, 2011, 04:01:57 am »
I find that happens with some runtime errors. Tbh I don't mess with 1.6, you could try 2.0?

majky358

  • Newbie
  • *
  • Posts: 3
    • View Profile
window is closing
« Reply #2 on: December 23, 2011, 01:55:27 pm »
no, could someone upload lib files from 2.0 ? tutorials sucks ....

majky358

  • Newbie
  • *
  • Posts: 3
    • View Profile
window is closing
« Reply #3 on: December 23, 2011, 02:52:11 pm »
i have installed vc10, with sfml 1.6, it works at this moment,...and at this moment... the same prob  :(