cURL / Mailing Lists / curl-library / Single Mail

curl-library

Static Lib Size

From: Patrick <mccpat_at_gmail.com>
Date: Fri, 4 Jan 2008 00:50:34 -0500

Hello. I'm compiling a program on Win32 (unfortunately), and I'm
linking libcurl statically.

I manually built the curl libraries. I'm using mingw, and can't run
configure, and therefore can't call it with --disable-* and
--without-*. So I edited the lib/Makefile.m32 file, and added a bunch
of "-DCURL_DISABLE_*"s to the CFLAGS. This helped quite a bit,
knocking the static library size down to about 157KB. However, it's
still nowhere near the 96KB the install guide mentioned. Here are my
CFLAGS (I'm probably not doing this right...):

-Os -s -fomit-frame-pointer -DCURL_STATICLIB -DBUILDING_LIBCURL
-DCURL_DISABLE_LDAPS -DCURL_DISABLE_COOKIES -DCURL_DISABLE_ARES
-DCURL_DISABLE_CRYPTO_AUTH -DCURL_DISABLE_TFTP -DCURL_DISABLE_TELNET
-DCURL_DISABLE_DICT -DCURL_DISABLE_LDAP -DCURL_DISABLE_HTTP
-DCURL_DISABLE_FILE

All I really need is FTP support. When I run "make -f Makefile.m32", I
noticed that file.c, http.c, etc are still compiling and therefore
being used in libcurl.a. How can I prevent this? I'm very used to *nix
where I can just run ./configure, so I need a bit of guideance.

Thank you.
Received on 2008-01-04