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

Author Topic: can't find graphics...  (Read 2798 times)

0 Members and 1 Guest are viewing this topic.

Goosage

  • Newbie
  • *
  • Posts: 1
    • View Profile
can't find graphics...
« on: March 04, 2011, 12:26:03 am »
I installed everything correctly with C::B but get this error when i try to compile anything with
"#include <SFML/Graphics.hpp>"
the error is
"ld.exe||cannot find -l-lsfml-graphics|"

Walker

  • Full Member
  • ***
  • Posts: 181
    • View Profile
can't find graphics...
« Reply #1 on: March 04, 2011, 06:19:59 am »
Follow the tutorial again. To the letter.

Make sure the lib files are in the mingw lib folder or you have configured C::B to look where you "installed" them. Also there's "-l-l" at the start of the name, I think there should only be one "-l" ("-lsfml-graphics"), but I'm not totally sure as I don't use gcc/MinGW very often. If you typed an "-l" and all your files seem to be in the right place, try removing it.

Some basic external library stuff: http://www.network-theory.co.uk/docs/gccintro/gccintro_17.html
This is on the command line, but still explains linking to external libs enough.

Also you need to link to sfml-system and sfml-window as well, otherwise you'll get some new errors once you get past this one.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
can't find graphics...
« Reply #2 on: March 04, 2011, 07:49:05 am »
In "additional libraries" it is "sfml-graphics", Code::Blocks will add "-l" automatically.
In "additional linker options" (sorry if the names don't match, I don't remember them) it is "-lsfml-graphics" since it can be any option, Code::Blocks won't modify it.
Laurent Gomila - SFML developer

 

anything