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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - CodeStepper

Pages: [1]
1
General / Re: Visual Studio 2008 and example in SFML
« on: August 12, 2012, 07:03:53 pm »
Sorry for this post,
problem solved :D

I change SFML_STATIC to SFML_DYNAMIC  :)

2
General / Visual Studio 2008 and example in SFML
« on: August 12, 2012, 06:49:14 pm »
So, when i compile this code:
#include <SFML/Graphics.hpp>

using namespace sf;

int main( void )
{
        VideoMode videoMode( 640, 480 );
        RenderWindow window( videoMode, "Wy&#347;wietlanie okna" );
       
        RectangleShape rectangle;
        rectangle.setPosition( 30, 30 );
        rectangle.setSize( Vector2f( 50, 30 ) );

        rectangle.setRotation( 45 );
        rectangle.setFillColor( Color::Yellow );
        rectangle.setOutlineColor( Color::Blue );
        rectangle.setOutlineThickness( 3 );

        while( window.isOpen( ) )
        {
                window.clear( );
                window.draw( rectangle );
                window.display( );

                Event event;
                while( window.pollEvent( event ) )
                {
                        if( event.type == Event::Closed )
                                window.close( );
                        else if( event.type == Event::KeyPressed )
                        {
                                switch( event.key.code )
                                {
                                case Keyboard::Escape: window.close( ); break;
                                case Keyboard::Up: rectangle.move( 0, -10 ); break;
                                case Keyboard::Down: rectangle.move( 0, 10 ); break;
                                case Keyboard::Left: rectangle.move( -10, 0 ); break;
                                case Keyboard::Right: rectangle.move( 10, 0 ); break;
                                }
                        }
                }
        }

        return EXIT_SUCCESS;
}

And compiler return this errors...:
main.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)
main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Blue" (?Blue@Color@sf@@2V12@B)
main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Yellow" (?Yellow@Color@sf@@2V12@B)

What i'm doing wrong? :/
Please, help me :)

Pages: [1]