title: SFML with Code::Blocks - "undefined reference to sf::Texture::getSize()"
body: <p>I used this tutorial <a href="http://www.sfml-dev.org/tutorials/2.0/start-cb.php" rel="nofollow noreferrer">http://www.sfml-dev.org/tutorials/2.0/start-cb.php</a> to add SFML to my Code::Blocks project, but I got errors like that:</p>
  
  <pre><code>undefined reference to sf::Texture::getSize() const
  undefined reference to sf::Sprite::Sprite()
  undefined reference to sf::Sprite::setTexture(sf::Texture const&amp;, bool)
  </code></pre>
  
  <p>Here are the screenshots from my settings:</p>
  
  <p>The liner settings:
  <img src="https://i.stack.imgur.com/S8o83.png" alt="enter image description here"></p>
  
  <p>The search directories for compiler:
  <img src="https://i.stack.imgur.com/IMMhU.png" alt="enter image description here"></p>
  
  <p>The search directories for linker:
  <img src="https://i.stack.imgur.com/SxEy2.png" alt="enter image description here"></p>
  
  <p>The compiler settings:
  <img src="https://i.stack.imgur.com/5whkY.png" alt="enter image description here"></p>
  
  <pre><code>||=== Build: Release in Space (compiler: GNU GCC Compiler) ===|
   undefined reference to `sf::Texture::getSize() const'
   undefined reference to `sf::Texture::getSize() const'
   undefined reference to `sf::Texture::getSize() const'
   undefined reference to `sf::Texture::getSize() const'
   undefined reference to `sf::Sprite::Sprite()'
   undefined reference to `sf::Sprite::setTexture(sf::Texture const&amp;, bool)'
   undefined reference to `sf::Transformable::setPosition(float, float)'
   undefined reference to `sf::Sprite::Sprite()'
   undefined reference to `sf::Sprite::setTexture(sf::Texture const&amp;, bool)'
   undefined reference to `sf::Transformable::setPosition(float, float)'
   undefined reference to `sf::RenderStates::Default'
   undefined reference to `sf::RenderTarget::draw(sf::Drawable const&amp;, sf::RenderStates const&amp;)'
   undefined reference to `vtable for sf::Sprite'
   undefined reference to `vtable for sf::Sprite'
   undefined reference to `sf::Transformable::~Transformable()'
   (.text$_ZN2sf6SpriteD1Ev[__ZN2sf6SpriteD1Ev]+0x3e)
  undefined reference to `vtable for sf::Sprite'
   (.text$_ZN2sf6SpriteD1Ev[__ZN2sf6SpriteD1Ev]+0x45)
  undefined reference to `vtable for sf::Sprite'
   (.text$_ZN2sf6SpriteD1Ev[__ZN2sf6SpriteD1Ev]+0x57)
   undefined reference to `sf::Transformable::~Transformable()'|
   undefined reference to `sf::Texture::getSize() const'
   undefined reference to `sf::Texture::getSize() const'
   undefined reference to `sf::Texture::getSize() const'
   undefined reference to `sf::Texture::getSize() const'
   undefined reference to `sf::Texture::getSize() const'
   undefined references to `sf::Texture::getSize() const' follow
   undefined reference to `sf::Clock::Clock()'
   undefined reference to `sf::seconds(float)'
   undefined reference to `sf::Time::Time()'
   undefined reference to `sf::operator&lt;(sf::Time, sf::Time)'
   undefined reference to `sf::Time::Zero'
   undefined reference to `sf::Time::Zero'
   undefined reference to `sf::Clock::restart()'
   undefined reference to `sf::operator+=(sf::Time&amp;, sf::Time)'
   undefined reference to `sf::Texture::getSize() const'
   undefined reference to `sf::Texture::getSize() const'
   undefined reference to `sf::Sprite::Sprite()'
   undefined reference to `sf::Sprite::setTexture(sf::Texture const&amp;, bool)'
   undefined reference to `sf::Transformable::setPosition(float, float)'
   undefined reference to `sf::Sprite::Sprite()'
   undefined reference to `sf::Sprite::setTexture(sf::Texture const&amp;, bool)'
   undefined reference to `sf::Transformable::setPosition(float, float)'
   undefined reference to `sf::RenderStates::Default'
   undefined reference to `sf::RenderTarget::draw(sf::Drawable const&amp;, sf::RenderStates  const&amp;)'|
   undefined reference to `vtable for sf::Sprite'
   undefined reference to `vtable for sf::Sprite'
   undefined reference to `sf::Transformable::~Transformable()'
   undefined reference to `sf::Sprite::getGlobalBounds() const'
   undefined reference to `sf::Sprite::getTextureRect() const'
   undefined reference to `sf::Transformable::getScale() const'
   undefined reference to `sf::Transformable::getTransform() const'
   undefined reference to `sf::Sprite::getTextureRect() const'
  ||More errors follow but not being shown.|
  ||Edit the max errors limit in compiler options...|
  ||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
  </code></pre>