SFML community forums

Help => Graphics => Topic started by: Broken on November 22, 2009, 05:23:42 pm

Title: Graphics
Post by: Broken 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???
Title: Graphics
Post by: panithadrum 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).
Title: Graphics
Post by: Broken 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
Title: Graphics
Post by: Laurent on November 22, 2009, 06:42:37 pm
Quote
I 'm not in debug mode yet

You are. Look at your screenshot ;)