Amos Shapira wrote: > Hi, > > I have a program which uses ns_initparse and friends but when it's compiled > against the shared libresolv these symbols aren't found. > > I found Debian bug 291609 (http://bugs.debian.org/291609) which states that > this is intentional but I couldn't find an explanation why - doesn't anyone > know the reason? > > Another question is that I figured out a way around this by specifying > /usr/lib/libresolv.a (the static library) on the linker command line but was > wondering whether there is a more "proper" way to tell the linker to use the > static library without specifying the full library path name on the command > line. > using the -Bstatic or just -static you're forcing the linker to use static libraries instead of shared objects. for example: "-static -lcrypto" will link with /usr/lib/libcrypto.a while "-lcrypto" will link with /usr/lib/libcrypto.so
That's off course the Linux behavior with GNU compiler. This can be used as many time as you wish in the linker command line toggling it is by using -dynamic. Also if you want to avoid recompiling you may use the environment variable LD_PRELOAD, which will cause you application to load the static library first. > Thanks, > > --Amos > > -- Ravid Baruch Naali [EMAIL PROTECTED] +972 4 6732729 +972 52 5830021 ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]