I have to link my code to a shared library without the lib prefix. (say, foo.so) The first problem is -l option does not find the file. So I tried directly including this file to the last compilation like this:
gcc a a.o /PATH/TO/FOO/foo.so
But in this case, a is hard linked to foo.so as an absolute path as seen in "ldd a":
/PATH/TO/FOO/foo.so
In the final deployment both files would end up being in the same folder, so this should be normal link, not the absolute path. How can I do this?