Name: Anonymous 2008-01-10 19:07
every fucking time i've linked my shared library i've had to specify a FULL STATIC PATH NAME in -soname, because if i don't, later i can't link it with my program
if i do this, which should be correct
ld -shared -soname libfoo.so -o libfoo.so libfoo.o
or even ld -shared -Wl,-soname,libfoo.so.1 and all that version crap
one of two things happen when i later link my program against it, the program links fine but doesn't run and ldd says it's linked against libfoo.so (NOT FOUND), OR i can't even link and it cries about libc not finding symbols and shit
anyways, if i instead do this
ld -shared -soname `pwd`/libfoo.so -o libfoo.so libfoo.o
THEN EVERYTHING WORKS, but ldd obviously shows my program linked with /usr/home/bla/bla/bla/full/fucking/static/ass/path/libfoo.so and i don't want that
WHAT THE HELL AM I MISSING /prog/??!?!?!?!?
additional info for tl;dr, of course i compile with -fPIC and all, read the fucking text, EVERYTHING WORKS but the library is linked with a FULL STATIC PATH NAME, that's the only detail that is bothering me, other than that compiling works fine, the program works fine, the library works fine
if i do this, which should be correct
ld -shared -soname libfoo.so -o libfoo.so libfoo.o
or even ld -shared -Wl,-soname,libfoo.so.1 and all that version crap
one of two things happen when i later link my program against it, the program links fine but doesn't run and ldd says it's linked against libfoo.so (NOT FOUND), OR i can't even link and it cries about libc not finding symbols and shit
anyways, if i instead do this
ld -shared -soname `pwd`/libfoo.so -o libfoo.so libfoo.o
THEN EVERYTHING WORKS, but ldd obviously shows my program linked with /usr/home/bla/bla/bla/full/fucking/static/ass/path/libfoo.so and i don't want that
WHAT THE HELL AM I MISSING /prog/??!?!?!?!?
additional info for tl;dr, of course i compile with -fPIC and all, read the fucking text, EVERYTHING WORKS but the library is linked with a FULL STATIC PATH NAME, that's the only detail that is bothering me, other than that compiling works fine, the program works fine, the library works fine