cURL / Mailing Lists / curl-library / Single Mail

curl-library

Compiling libcurl statically, enforcing elf32-i386 instead of COFF

From: Patryk - <nontoxic_1_at_hotmail.com>
Date: Fri, 20 Apr 2012 14:13:38 +0000

Hello,

I need to compile libcurl statically, so that it does not rely on external shared libraries.
I've used this command to do it, but in the end there are always unresolved externals to, for example, _strlen:

./configure --disable-shared --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp --disable-gopher --enable-nonblocking --disable-hidden-symbols --without-ssl --without-zlib --without-libidn --without-libssh2 --without-nss --without-cyassl --without-polarssl --without-gnutl

(the only protocol I need is HTTP)

Also, the compiled libcurl.a contains .o files compiled in a COFF format - and I need them in ELF, is there any directive for this?

I am using gcc-linux in Cygwin to cross-compile libcurl for Linux apps on Windows 7.
gcc-linux version information:

# gcc-linux -v
Reading specs from /opt/crosstool/i686-unknown-linux-gnu/gcc-3.3.4-glibc-2.1.3/l
ib/gcc-lib/i686-unknown-linux-gnu/3.3.4/specs
Configured with: /home/Jussi/crosstool-0.28-rc37/build/i686-unknown-linux-gnu/gc
c-3.3.4-glibc-2.1.3/gcc-3.3.4/configure --target=i686-unknown-linux-gnu --host=i
686-host_pc-cygwin --prefix=/opt/crosstool/i686-unknown-linux-gnu/gcc-3.3.4-glib
c-2.1.3 --with-headers=/opt/crosstool/i686-unknown-linux-gnu/gcc-3.3.4-glibc-2.1
.3/i686-unknown-linux-gnu/include --with-local-prefix=/opt/crosstool/i686-unknow
n-linux-gnu/gcc-3.3.4-glibc-2.1.3/i686-unknown-linux-gnu --disable-nls --enable-
threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c+
+ --enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 3.3.4

Thanks, kind regards
Patrick Widuliński
                                               

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