Query related to library linking.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a basic query related to linking of static and dynamic libraries.

My program needs to use 'libcrypto', libssl and libnetsnmp libraries.
Out of these, the libnetsnmp and libssl have dependency on libcrypto.
For some reason, I need to link the libcrypto and libssl statically to my program.
So I have built libcrypto.a and libssl.a and I am able to link them correctly.

But when libnetsnmp gets linked, since it is a shared object, it also links libcrypto.so.
So why should libnetsnmp again try to link libcrypto.so when the symbols are already resolved while statically linking libcrypto.a?
Is there some way to avoid it? I tried using -static and -Bstatic.

Any advice on this will be appreciated.

--
Thanks,
Nilesh
P.S. : I tried looking for any clue in archives. Please redirect me to the link, if such queries are already answered.





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux