cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Statically linked shared object

From: Chris Haddon <chaddon_at_securityfocus.com>
Date: Thu, 15 Nov 2001 15:33:52 -0700 (MST)

Hey Miklos,
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.
Chris.

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.
>
> Miklos
>
>
>
>
Received on 2001-11-15