0 Members and 2 Guests are viewing this topic.
The "link libraries" settings are not the same as in the tutorial. Compare the screenshots.
And the libraries to link are different between debug and release configurations. This is even written in red in the tutorial.
It's not possible to input "sfml-graphics" into the "link libraries" field in my Code::Blocks (only into the "other linker options"). The "link libraries" field only accepts a direct path to the file.
Like this? http://imgur.com/a/fIQvNUnfortunately that doesn't work either.
Quote from: AB on April 30, 2013, 10:10:46 amIt's not possible to input "sfml-graphics" into the "link libraries" field in my Code::Blocks (only into the "other linker options"). The "link libraries" field only accepts a direct path to the file.Nope, that's just you thinking it can't take anything else. Don't use the ... button to choose a file, but simply enter sfml-graphics.
So what, I photoshoped the tutorial screenshot?
Can you provide the full error, since they can provide more details to what goes wrong.
||=== Tetris2, Debug ===|obj\Debug\main.o||In function `main':|E:\Coding\Tetris2\main.cpp|5|undefined reference to `sf::String::String(char const*, std::locale const&)'|E:\Coding\Tetris2\main.cpp|5|undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'|E:\Coding\Tetris2\main.cpp|5|undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'|E:\Coding\Tetris2\main.cpp|6|undefined reference to `sf::CircleShape::CircleShape(float, unsigned int)'|E:\Coding\Tetris2\main.cpp|7|undefined reference to `sf::Color::Green'|E:\Coding\Tetris2\main.cpp|7|undefined reference to `sf::Shape::setFillColor(sf::Color const&)'|E:\Coding\Tetris2\main.cpp|15|undefined reference to `sf::Window::close()'|E:\Coding\Tetris2\main.cpp|12|undefined reference to `sf::Window::pollEvent(sf::Event&)'|E:\Coding\Tetris2\main.cpp|18|undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'|E:\Coding\Tetris2\main.cpp|18|undefined reference to `sf::RenderTarget::clear(sf::Color const&)'|E:\Coding\Tetris2\main.cpp|19|undefined reference to `sf::RenderStates::Default'|E:\Coding\Tetris2\main.cpp|19|undefined reference to `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'|E:\Coding\Tetris2\main.cpp|20|undefined reference to `sf::Window::display()'|E:\Coding\Tetris2\main.cpp|9|undefined reference to `sf::Window::isOpen() const'|E:\Coding\Tetris2\main.cpp|23|undefined reference to `sf::RenderWindow::~RenderWindow()'|E:\Coding\Tetris2\main.cpp|5|undefined reference to `sf::RenderWindow::~RenderWindow()'|E:\Coding\Tetris2\main.cpp|23|undefined reference to `sf::RenderWindow::~RenderWindow()'|obj\Debug\main.o||In function `ZN2sf11CircleShapeD1Ev':|E:\Coding\Tetris2\..\SFML-2.0\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `vtable for sf::CircleShape'|E:\Coding\Tetris2\..\SFML-2.0\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `vtable for sf::CircleShape'|E:\Coding\Tetris2\..\SFML-2.0\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `sf::Shape::~Shape()'|||=== Build finished: 20 errors, 0 warnings (0 minutes, 0 seconds) ===|
GCC 4.7 TDM (SJLJ) - 64 bits