cURL / Mailing Lists / curl-users / Single Mail


Re: Building cURL without dependencies on libcurl/openssl so's

From: Daniel Stenberg <>
Date: Sat, 3 May 2003 16:06:53 +0200 (CEST)

On Fri, 2 May 2003, HART, CHRISTOPHER T wrote:

> This is probably a very basic, simple question, but I've been having some
> trouble with it... Basically, I want to build curl without needing to have
> libcurl or openssl libraries after compilation time. I thought this was
> done by specifying static linking of libraries, but so far, I haven't been
> able to make this happen. (I've tried setting the CFLAGS environment
> variable to -B=static, -static and --static, none of which have had the
> desired affect.) From the documentation I've seen on building curl, I
> thought that would be enough. Searching Google for static linking in gcc
> hasn't been much of a help for me, but maybe I don't know what to look for.
> Any advice would be appreciated.

To build the curl tool static without using a dynamic libcurl, you run
'configure --disable-shared'. But this doesn't make anything else but libcurl
static in the build.

To make a completely static build, use my approach I wrote about here:

(Yeah, I should document this in the INSTALL document or even write up a fix
for configure to allow this easier. Help is appreciated.)

 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
This email is sponsored by:ThinkGeek
Welcome to geek heaven.
Received on 2003-05-03