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

Author Topic: SFML 1.6 - Problem with linking  (Read 1678 times)

0 Members and 1 Guest are viewing this topic.

Mitmischer 1703

  • Newbie
  • *
  • Posts: 8
    • View Profile
SFML 1.6 - Problem with linking
« on: April 15, 2011, 05:08:13 pm »
Hi!

I have a problem with linking my project. It compiles fine, but when linking, it says

Quote
undefined reference to `sf::Window::Display()'


I have included Window.hpp and I tried to display my window:

Code: [Select]
#include <SFML/Window.hpp>
App->Display();


What could I have forgotten? I'm using Code::Blocks and in the linker-tab, I've added libsfml-system.a as a library to link and -lsfml-system
as a parameter to the linker. The library is taken form the SDK, folder \lib. I am compiling with mingw g++, version 4.3.3.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 1.6 - Problem with linking
« Reply #1 on: April 15, 2011, 05:22:59 pm »
Quote
I've added libsfml-system.a as a library to link and -lsfml-system
as a parameter to the linker

You don't need both, they are equivalent. And you must add sfml-window to link to the window module.
Laurent Gomila - SFML developer

Mitmischer 1703

  • Newbie
  • *
  • Posts: 8
    • View Profile
SFML 1.6 - Problem with linking
« Reply #2 on: April 15, 2011, 05:43:53 pm »
Oh, you're so right! Sorry...