...are giving me a headache.
I have an app, that uses a library, lets call it libMyLib.so.
I have the files for libMyLib in a seperate directory:
Main Solution Directory
|
+-bin
|
+-MyApp
|
+-MyLib
'bin' is where all my targets get placed.
I include it in my libraries I need to link, using "../bin/Debug/libMyLib.so".
I compile it, and it has no problem, but when I run it from the bin/Debug directory in Terminal, I get the following:
./MyApp: error while loading shared libraries: ../bin/Debug/libMyLib.so: cannot open shared object file: No such file or directory
Notice that this error is looking for a bin/bin/Debug/libMyLib.so (extra bin intended) as '.' refers to bin/Debug at the time of running.
This is making me think that the location of the library is hardcoded. Why is that?
LD_DEBUG=libs offers no help, except for listing other (successful) loading libraries (libdl.so, in my current situation).
Speaking of libdl.so, THAT is giving me headaches too, as I ended up needing to give a relative path to including it. (I could not just add "libdl.so" to the librares to link, as it gave me the error "could not find -ldl.so" when trying to compile)
... BAH!