cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Minimizing libcurl size

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 4 Dec 2001 08:33:10 +0100 (MET)

On Tue, 4 Dec 2001, Cadime wrote:

> I am now trying to compile last curl version, but I will just need to use
> libcurl as a static library in my project without ssl ( I really just
> need ftp).
>
> I want to minimize the size of the library.
>
> What are the flags I can try?
>
> I am currently using:
> CC=cc ./configure --disable-shared --without-ssl
>
> on HP-UX 11

That's pretty much all you can do without touching the source code. I want to
make it possible to shut off specific protocols in the future (with configure
switches), but that is not currently possible.

If file size is a matter, make sure you optimize for size (compiler-wise) and
that you 'strip' the final executable.

If that is not enough, editing the source code to add #ifdef USE_HTTP (or
something) on a few suitable places could probably decrease the output size
considerably.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-12-04