SFML community forums
Help => General => Topic started by: Goosage 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|"
-
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.
-
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.