cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: distributing a compiled program using libcurl

From: Bertrand Demiddelaer <bdemiddelaer_at_denyall.com>
Date: Tue, 02 Nov 2004 17:45:32 +0100

Flavio Tischhauser wrote:
> Hi
>
> Bertrand Demiddelaer wrote:
>
>> Flavio Tischhauser wrote:
>>
>>> Is there a way to strip any unused functions (it only needs to do
>>> simple HTTP Posts, no SSL, no zip etc) Or do you have other tips on
>>> how to reduce the size of my program and still run it on every
>>> "standard linux server"?
>>
>>
>> You still can create your own specific restricited libcurl.a using
>> options for configure like --disable-ftp --disable-gopher
>> --disable-file --disable-ldap --disable-dict --disable-telnet
>> --without-ssl --without-zlib
>
>
> Thanks a lot, I'll try that!
>
> While playing around with the libraries I noticed that about 1MB of the
> "overhead" is caused by the C/C++ libraries (which are more likely to be
> present on the target system). Is it possible to only link the libcurl
> statically, but keep the libc stuff dynamically linked?

Yep. Don't use "--static", just add /path/to/your/own/libcurl.a in your
compilation command line instead of -lcurl :-) After compilation, don't
forget to strip your executable...
Received on 2004-11-02