So, when i compile this code:
#include <SFML/Graphics.hpp>
using namespace sf;
int main( void )
{
VideoMode videoMode( 640, 480 );
RenderWindow window( videoMode, "Wyś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