SFML 2.0 works absolutely fine with Code::Blocks, but I'm having trouble setting up SFML 2.1. I have followed
THIS guide perfectly many times, but when I try to compile the example project, it gives me a long list of undifined references to all sf:: commands. Example:
obj\Release\main.o:main.cpp:(.text.startup+0x125)||undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'|
I have followed the guide PERFECTLY, and tried compiling and re-compiling my project several times, but the problem persists.
Here is my build log:
-------------- Build: Release in Pooman of Poopooland! (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -std=c++11 -std=c++0x -std=c++98 -Wall -ansi -DSFML_STATIC -O2 -DSFML_STATIC -IC:\SFML-2.1\include -IC:\SFML-2.1\include -IC:\SDL-1.2.15\include -c "C:\Documents and Settings\Kain\Επιφάνεια εργασίας\Pooman\Pooman of Poopooland!\main.cpp" -o obj\Release\main.o
mingw32-g++.exe -LC:\SFML-2.1\lib -LC:\SFML-2.1\lib -LC:\SDL-1.2.15\lib -o "bin\Release\Pooman of Poopooland!.exe" obj\Release\main.o -s -lmingw32 -lSDLmain -lSDL -lSDL_image -lSDL_mixer -lsfml-graphics-s -lsfml-audio-s -lsfml-window-s -lsfml-system-s -lsfml-graphics-s -lsfml-audio-s -lsfml-window-s -lsfml-system-s
obj\Release\main.o:main.cpp:(.text$_ZN2sf11CircleShapeD1Ev[__ZN2sf11CircleShapeD1Ev]+0x2): undefined reference to `vtable for sf::CircleShape'
obj\Release\main.o:main.cpp:(.text$_ZN2sf11CircleShapeD1Ev[__ZN2sf11CircleShapeD1Ev]+0x9): undefined reference to `vtable for sf::CircleShape'
obj\Release\main.o:main.cpp:(.text$_ZN2sf11CircleShapeD1Ev[__ZN2sf11CircleShapeD1Ev]+0xe): undefined reference to `sf::Shape::~Shape()'
obj\Release\main.o:main.cpp:(.text.startup+0xb5): undefined reference to `sf::String::String(char const*, std::locale const&)'
obj\Release\main.o:main.cpp:(.text.startup+0xec): undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
obj\Release\main.o:main.cpp:(.text.startup+0x125): undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'
obj\Release\main.o:main.cpp:(.text.startup+0x18e): undefined reference to `sf::CircleShape::CircleShape(float, unsigned int)'
obj\Release\main.o:main.cpp:(.text.startup+0x198): undefined reference to `sf::Color::Green'
obj\Release\main.o:main.cpp:(.text.startup+0x1ad): undefined reference to `sf::Shape::setFillColor(sf::Color const&)'
obj\Release\main.o:main.cpp:(.text.startup+0x1c5): undefined reference to `sf::Window::isOpen() const'
obj\Release\main.o:main.cpp:(.text.startup+0x1ee): undefined reference to `sf::Window::pollEvent(sf::Event&)'
obj\Release\main.o:main.cpp:(.text.startup+0x212): undefined reference to `sf::Window::close()'
obj\Release\main.o:main.cpp:(.text.startup+0x23e): undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'
obj\Release\main.o:main.cpp:(.text.startup+0x255): undefined reference to `sf::RenderTarget::clear(sf::Color const&)'
obj\Release\main.o:main.cpp:(.text.startup+0x25e): undefined reference to `sf::RenderStates::Default'
obj\Release\main.o:main.cpp:(.text.startup+0x272): undefined reference to `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'
obj\Release\main.o:main.cpp:(.text.startup+0x280): undefined reference to `sf::Window::display()'
obj\Release\main.o:main.cpp:(.text.startup+0x2af): undefined reference to `sf::RenderWindow::~RenderWindow()'
obj\Release\main.o:main.cpp:(.text.startup+0x3bf): undefined reference to `sf::RenderWindow::~RenderWindow()'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
19 errors, 0 warnings (0 minutes, 1 seconds)
What am I doing wrong?