cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: can i just configure and build a wholly static "curl"?

From: Eric Cooper <ecc_at_cmu.edu>
Date: Wed, 27 Jul 2005 14:06:54 -0400

On Wed, Jul 27, 2005 at 10:14:27AM -0400, Robert P. J. Day wrote:
> is there a config option with which i can build an entirely static
> curl executable? i'm aware that the "--enable-static" and
> "--enable-shared" options refer only to the curl library itself.

I don't know how to this with a configure option, but it's easy
to do "by hand". Just run configure and make as usual. Find the
command near the end that actually links the curl binary -- on my
system, it looked like this:

gcc -g -O2 -o curl main.o hugehelp.o urlglob.o writeout.o writeenv.o
getpass.o homedir.o strtoofft.o timeval.o ../lib/.libs/libcurl.a
/usr/lib/libidn.a -lssl -lcrypto -ldl -lz

Re-execute this command with "-static" as an option to gcc.

-- 
Eric Cooper             e c c @ c m u . e d u
Received on 2005-07-27