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

Author Topic: undefined reference to 'sf*'  (Read 3729 times)

0 Members and 1 Guest are viewing this topic.


  • Newbie
  • *
  • Posts: 1
    • View Profile
undefined reference to 'sf*'
« on: July 03, 2012, 05:42:14 pm »
I compiled the file with 'gcc -o sfml sfml.c -lsfml-graphics
and I get an undefined reference to every instance of an sf function.


  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: undefined reference to 'sf*'
« Reply #1 on: July 03, 2012, 06:07:15 pm »
If you compile C code that uses CSFML you should link against CSFML and not SFML. Moreover you'll need to link against the system, window and graphics modules if you use the latter (like you'll do it with the C++ version of SFML).
SFML / OS X developer