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

Author Topic: Graphics  (Read 2171 times)

0 Members and 1 Guest are viewing this topic.

Broken

  • Newbie
  • *
  • Posts: 26
    • View Profile
Graphics
« on: November 22, 2009, 05:23:42 pm »
Code: [Select]
#include<SFML/Graphics.hpp>
int main()
{
   
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
   
    while (App.IsOpened())
    {
       
        sf::Event Event;
        while (App.GetEvent(Event))
        {
           
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }

       
        App.Clear();

        App.Display();
    }

    return EXIT_SUCCESS;
}

I write this code and I get this http://i46.tinypic.com/o7j7a1.jpg
what is wrong???

panithadrum

  • Sr. Member
  • ****
  • Posts: 304
    • View Profile
    • Skyrpex@Github
    • Email
Graphics
« Reply #1 on: November 22, 2009, 06:18:51 pm »
Make sure that you link with the correct libraries.

You are in Debug mode, so you may link with the libraries that end with -d, ie: sfml-graphics-s-d.lib (for static link) or sfml-graphics-d.lib (for dynamic).

Broken

  • Newbie
  • *
  • Posts: 26
    • View Profile
Graphics
« Reply #2 on: November 22, 2009, 06:26:32 pm »
i link sfml-system.lib sfml-window.lib sfml-graphics.lib I 'm not in debug mode yet

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Graphics
« Reply #3 on: November 22, 2009, 06:42:37 pm »
Quote
I 'm not in debug mode yet

You are. Look at your screenshot ;)
Laurent Gomila - SFML developer

 

anything