curl / Mailing Lists / curl-library / Single Mail


Re: Is there a way to statically link only nghttp2 but not others (openssl)

From: Daniel Stenberg <>
Date: Thu, 4 Jan 2018 05:44:02 +0100 (CET)

On Tue, 2 Jan 2018, Sunil Sayyaparaju via curl-library wrote:

> So, I am wondering if I can only statically link with nghttp2 but not
> openssl. Is there a way ?

Sure. The regular linker can mix and match both shared and static ones. I find
it is often easiest if I don't even have any shared ones to offer and just
specify the path to the dir with the static ones and provide the right -L and
-l options. If you have both installed, you of course need to use ld's or
gcc'c "-static" options.

Linking statically is generally a pain since you need to provide all the sub
dependencies and do that in the right order etc.

Received on 2018-01-04