cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl Aggressive Optimize for size

From: Jie He <jie.he.cn_at_gmail.com>
Date: Tue, 18 Sep 2012 14:58:51 +0800

why would you use the dynamic link to these library?

2012/9/18 Emanuel Patern <emanuelpatern_at_yahoo.com>

> Hi;
>
> I have built libcurl with openssl all in static mode. In My C++ project, I
> added the required libcurl.a, libssl.a and libcrypto.a to my project and
> creates a symple curl session for testing.
> My project requires also the following static libs that I have linked with
> :
> * libgdi32.a
> * libws2_32.a
>
> After compile, the executable size jump from 8KB into 2.16 MB !!
> This is a huge size, especially and what surprise me is that I have added
> optimization options to minimize for size :
>
> -fno-rtti
> -fno-exceptions
> -ffunction-sections
> -fdata-sections
> -Os
>
> But that doesn't seem that curl or openssl takes that optimization options
> in mind. I am not sure but did I miss to compile either curl or openssl
> with optimization options, if in case how to rebuild either curl or openssl
> with size optimization enabled ?
>
> Regards
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

-- 
Best Regards
He Jie ºÎ½Ü

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-09-18