Jul 10, 2011 at 6:18pm UTC
I have no errors with compiling my program like this:
g++ -o client test2.o -lsfml-network -lsfml-system
but when I run "client", I get the error:
"./client: error while loading shared libraries: libsfml-network.so.1.6: cannot open shared object file: No such file or directory"
I even tried compiling my program with -L/usr/local/lib but that still does not work do anything. Thanks for any help.
Jul 10, 2011 at 10:22pm UTC
Ensure that the directory containing the .so is in your LD_LIBRARY_PATH.
Jul 11, 2011 at 2:25am UTC
Is it possible to use -L? In Windows that adds a library search path temporarily.
Ex:
g++ main.cpp -LC:\SFML-1.6\Lib -lsfml-system -lsfml-window
Last edited on Jul 11, 2011 at 2:28am UTC
Jul 11, 2011 at 2:38am UTC
The problem is a runtime problem. The loader can't find libsfml-network.so.1.6. The loader looks in certain pre-defined directories and LD_LIBRARY_PATH to find the library. It's not in any of those, so the solution is to find the library and add it's path to LD_LIBRARY_PATH.
Jul 12, 2011 at 1:37pm UTC
woah woah does the program compile at alll? does that error display when you RUN the program? :S
ok so here are 5 possible steps (stop whenever it starts working :P)
1. run
2. re-install SFML
3. install SFML from source (sometimes the repo has a bad copy)
4. run
5. Insall SFML2 ... it is still in developement but its coming along
All the best! Good luck!
Last edited on Jul 12, 2011 at 1:37pm UTC