I use Linux and Eclipse.
I want to use the library ( Box2D ). I have a lib file " libBox2D.so.2.1.0". I placed it in a separate folder libin my project folder (also the working directory for the executable).
I added -lBox2Dlinker to the command line arguments. (This means that I added "Box2D" as a library in the Eclipse GUI).
But when I try to start it, my application automatically prints that it cannot find the library file " libBox2D.so.2.1.0" with the following message:
error while loading shared libraries: libBox2D.so.2.1.0: cannot open shared object object: No such file or directory
I think he is looking for this library in /usr/lib/....
So: how can I tell the compiler / linker / "no matter what you need to know?" That my application should look for the library in the relative path " lib/libBox2D.so.2.1.0" (relative to the working dir)?
Maybe: can there be a problem on the Box2D download page (link here above), they say that this is the version 2.1.2, and this library is the version 2.1.0(if I look at the username)?
PS: I also tried putting it at the root of my project folder, but that failed ...
Any help would be greatly appreciated.
Thanks
source
share