Hi,
I'm using Linux and Eclipse.
I want to use a library (Box2D). I have the lib-file "libBox2D.so.2.1.0
". I put it in a self-made lib
folder in my project folder (also the working directory for the executable).
I added -lBox2D
to the linker command-line arguments. (This means I added "Box2D" as library in the Eclipse GUI).
But when I try to run it, my application prints automaticly that he cannot find the "libBox2D.so.2.1.0
" library file with the following message:
error while loading shared libraries: libBox2D.so.2.1.0: cannot open shared object file: No such file or directory
I think he is searching for this library in /usr/lib/
....
So: How can I tell the compiler/linker/"whatever-that-needs-to-know-it" that my application has to look for the library at the relative path "lib/libBox2D.so.2.1.0
" (relative to the working dir)?
Maybe: Can the problem be that on the download page of Box2D (the link here above), they say it is version 2.1.2
and that library is version 2.1.0
(if I look to the soname)?
PS: I also tried to put it in the root of my project folder, but it didn't succeed...
Any help would be very appreciated.
Thanks