SFML community forums
Help => General => Topic started by: wasalski on April 26, 2011, 06:33:13 pm
-
I installed SFML in my home directory, and am trying to compile the example from http://www.sfml-dev.org/tutorials/1.6/start-linux.php .
this is the command I use:
g++ first.cc -I/home/wasalski/SFML-1.6/include -L/home/wasalski/SFML-1.6/lib -lsfml-system
as you can see, I including the header files and the library path
I get the following error message:
/usr/bin/ld: cannot find -lsfml-system
collect2: ld returned 1 exit status
but I have verified that libsfml-system.so.1.6 exists, and have tried to make a symlink to libsfml-system.so.1.6 called libsfml-system.so
wasalski@jamieson2:~/SFML-1.6/lib $ ls
libsfml-audio.so.1.6 libsfml-network.so.1.6 libsfml-system.so.1.6
libsfml-graphics.so.1.6 libsfml-system.so libsfml-window.so.1.6
Now I am out of ideas, can anyone tell me what is going on?
-
I think you need a "-o" and an application name in there if it's like MinGW.
g++ -I/home/wasalski/SFML-1.6/include first.cc -o first -L/home/wasalski/SFML-1.6/lib -lsfml-system
-
Thanks!
-
Now I'm using:
$ g++ -I/home/wasalski/SFML-1.6/include first.cc -o first -L/home/wasalski/SFML-1.6/lib -lsfml-system
And getting:
/home/wasalski/SFML-1.6/lib/libsfml-system.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)@GLIBCXX_3.4.9'
/home/wasalski/SFML-1.6/lib/libsfml-system.so: undefined reference to `std::ctype<char>::_M_widen_init() const@GLIBCXX_3.4.11'
collect2: ld returned 1 exit status
Can anyone tell me what is going on?