Re: Statically linked shared object
Date: Thu, 15 Nov 2001 15:33:52 -0700 (MST)
I just did this yesterday :)
You need to use the the compiler switch -Xlinker to pass
switches to the linker. The linker switches you need are -Bstatic and -Bdynamic.
As an example:
gcc (...) -Xlinker -Bstatic -Xlinker -lssl -Xlinker -Bdynamic -Xlinker -lcurl
That would link ssl statically and curl dynamically.
You need -Xlinker for each argument you pass.
Also -Bstatic must precede -Bdynamic.
On Thu, 15 Nov 2001, Miklos Nemeth wrote:
> I'm working on an e-payment module using libcurl for a scripting language.
> The module has to be implemented as a shared object (.so) library
> on UNIXes.
> I've linked the so module with libcurl and OpenSSL dynamically,
> but I'd like to have a statically linked so module.
> How to do that on Linux and Solaris?
> What parameters shall I change in the make files?
> Thank you for the help.
Received on 2001-11-15