curl-library
Re: Statically linking libcurl in Mac OS X.
Date: Mon, 14 Mar 2005 16:54:44 -0600
On Mar 14, 2005, at 4:27 PM, Óscar Morales Vivó wrote:
> No luck there. I'm looking at it and it seems pretty clear
> libz/libssl/libcrypto are being dynamically linked. It just seems to
> be piling together all the .o files and not doing anything else about
> their size.
Hmm, you are correct. Use the "strip" command to strip symbols. Try
"stip -S" on libcurl.a to remove the debugging symbols:
% cp /usr/local/lib/libcurl.a /tmp
% ll -sh /tmp/libcurl.a
1.7M -rw-r--r-- 1 dave wheel 1.7M Mar 14 16:49
/tmp/libcurl.a
% strip -S /tmp/libcurl.a
% ll -sh /tmp/libcurl.a
344k -rw-r--r-- 1 dave wheel 344k Mar 14 16:50
/tmp/libcurl.a
For some reason "make install-strip" does not strip the static library,
only the shared library. Hrm.. okay, tried "strip -x" on libcurl.a and
I got the following error:
% strip -x /tmp/libcurl.a
strip: symbols referenced by indirect symbol table entries that can't
be stripped in: /tmp/libcurl.a(http.o)
_add_buffer
In any case, removing the debugging symbols with "-S" is a big savings.
-Dave
Received on 2005-03-14