curl-library
Re: Trying to cross compile libcurl with MinGW 32-bit from Ubuntu, for Win32 Executables
Date: Sun, 16 Feb 2014 21:54:46 -0500
With just static, it still says 'Shared', and I noticed that it thinks we
are not cross compiling...
$ PATH=$PATH:/path/to/mingw32/bin ./configure --host=i686-w64-mingw32
--with-zlib=/path/to/mingw32 --prefix=/path/to/mingw32 --enable-static
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... yes
checking whether to enable c-ares for DNS lookups... no
checking for path separator... :
checking for sed... /bin/sed
checking for grep... /bin/grep
checking for egrep... /bin/grep -E
checking for i686-w64-mingw32-ar...
/path/to/mingw32/bin/i686-w64-mingw32-ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for i686-w64-mingw32-gcc... i686-w64-mingw32-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no <<=====
...
curl version: 7.35.0
Host setup: i686-w64-mingw32
Install prefix: /path/to/mingw32
Compiler: i686-w64-mingw32-gcc
SSL support: enabled (OpenSSL)
SSH support: no (--with-libssh2)
zlib support: enabled
GSSAPI support: no (--with-gssapi)
SPNEGO support: no (--with-spnego)
TLS-SRP support: no (--enable-tls-srp)
resolver: default (--enable-ares / --enable-threaded-resolver)
ipv6 support: no (--enable-ipv6)
IDN support: no (--with-{libidn,winidn})
Build libcurl: Shared=yes, Static=no
Built-in manual: enabled
--libcurl option: enabled (--disable-libcurl-option)
Verbose errors: enabled (--disable-verbose)
SSPI support: no (--enable-sspi)
ca cert bundle: /etc/ssl/certs/ca-certificates.crt
ca cert path: no
LDAP support: enabled (winldap)
LDAPS support: enabled
RTSP support: enabled
RTMP support: no (--with-librtmp)
metalink support: no (--with-libmetalink)
HTTP2 support: disabled (--with-nghttp2)
Protocols: DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP
LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP
With specifically disabling shared, and enabling static..
$ PATH=$PATH:/path/to/mingw32/bin ./configure --host=i686-w64-mingw32
--with-zlib=/path/to/mingw32 --prefix=/path/to/mingw32 --enable-static
--disable-shared
...
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
...
curl version: 7.35.0
Host setup: i686-w64-mingw32
Install prefix: /path/to/mingw32
Compiler: i686-w64-mingw32-gcc
SSL support: enabled (OpenSSL)
SSH support: no (--with-libssh2)
zlib support: enabled
GSSAPI support: no (--with-gssapi)
SPNEGO support: no (--with-spnego)
TLS-SRP support: no (--enable-tls-srp)
resolver: default (--enable-ares / --enable-threaded-resolver)
ipv6 support: no (--enable-ipv6)
IDN support: no (--with-{libidn,winidn})
Build libcurl: Shared=no, Static=yes
Built-in manual: enabled
--libcurl option: enabled (--disable-libcurl-option)
Verbose errors: enabled (--disable-verbose)
SSPI support: no (--enable-sspi)
ca cert bundle: /etc/ssl/certs/ca-certificates.crt
ca cert path: no
LDAP support: enabled (winldap)
LDAPS support: enabled
RTSP support: enabled
RTMP support: no (--with-librtmp)
metalink support: no (--with-libmetalink)
HTTP2 support: disabled (--with-nghttp2)
Protocols: DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP
LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP
$ PATH=$PATH:/path/to/mingw32/bin make
...
/bin/bash ../libtool --tag=CC --mode=link i686-w64-mingw32-gcc -O2
-Wno-system-headers -L/path/to/mingw32/lib -o curl.exe
curl-tool_binmode.o curl-tool_bname.o curl-tool_cb_dbg.o curl-tool_cb_hdr.o
curl-tool_cb_prg.o curl-tool_cb_rea.o curl-tool_cb_see.o curl-tool_cb_wrt.o
curl-tool_cfgable.o curl-tool_convert.o curl-tool_dirhie.o
curl-tool_doswin.o curl-tool_easysrc.o curl-tool_formparse.o
curl-tool_getparam.o curl-tool_getpass.o curl-tool_help.o
curl-tool_helpers.o curl-tool_homedir.o curl-tool_hugehelp.o
curl-tool_libinfo.o curl-tool_main.o curl-tool_metalink.o
curl-tool_mfiles.o curl-tool_msgs.o curl-tool_operate.o curl-tool_operhlp.o
curl-tool_panykey.o curl-tool_paramhlp.o curl-tool_parsecfg.o
curl-tool_setopt.o curl-tool_sleep.o curl-tool_urlglob.o curl-tool_util.o
curl-tool_vms.o curl-tool_writeenv.o curl-tool_writeout.o curl-tool_xattr.o
../lib/curl-strtoofft.o ../lib/curl-strdup.o ../lib/curl-rawstr.o
../lib/curl-nonblock.o ../lib/libcurl.la -lssl -lcrypto -lgdi32 -lssl
-lcrypto -lwldap32 -lz -lws2_32
libtool: link: i686-w64-mingw32-gcc -O2 -Wno-system-headers -o curl.exe
curl-tool_binmode.o curl-tool_bname.o curl-tool_cb_dbg.o curl-tool_cb_hdr.o
curl-tool_cb_prg.o curl-tool_cb_rea.o curl-tool_cb_see.o curl-tool_cb_wrt.o
curl-tool_cfgable.o curl-tool_convert.o curl-tool_dirhie.o
curl-tool_doswin.o curl-tool_easysrc.o curl-tool_formparse.o
curl-tool_getparam.o curl-tool_getpass.o curl-tool_help.o
curl-tool_helpers.o curl-tool_homedir.o curl-tool_hugehelp.o
curl-tool_libinfo.o curl-tool_main.o curl-tool_metalink.o
curl-tool_mfiles.o curl-tool_msgs.o curl-tool_operate.o curl-tool_operhlp.o
curl-tool_panykey.o curl-tool_paramhlp.o curl-tool_parsecfg.o
curl-tool_setopt.o curl-tool_sleep.o curl-tool_urlglob.o curl-tool_util.o
curl-tool_vms.o curl-tool_writeenv.o curl-tool_writeout.o curl-tool_xattr.o
../lib/curl-strtoofft.o ../lib/curl-strdup.o ../lib/curl-rawstr.o
../lib/curl-nonblock.o -L/path/to/mingw32/lib ../lib/.libs/libcurl.a
-lgdi32 -lssl -lcrypto -lwldap32 -lz -lws2_32
/path/to/mingw32/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0x1070):
undefined reference to `_imp__CreateDCW_at_16'
/path/to/mingw32/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0x107e):
undefined reference to `_imp__CreateCompatibleDC_at_4'
/path/to/mingw32/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0x1089):
undefined reference to `_imp__GetDeviceCaps_at_8'
/path/to/mingw32/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0x10cd):
undefined reference to `_imp__CreateCompatibleBitmap_at_12'
/path/to/mingw32/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0x10e4):
undefined reference to `_imp__SelectObject_at_8'
/path/to/mingw32/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0x110a):
undefined reference to `_imp__GetObjectW_at_12'
/path/to/mingw32/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0x11b7):
undefined reference to `_imp__BitBlt_at_36'
/path/to/mingw32/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0x11cf):
undefined reference to `_imp__GetBitmapBits_at_12'
/path/to/mingw32/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0x1249):
undefined reference to `_imp__DeleteObject_at_4'
/path/to/mingw32/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0x124f):
undefined reference to `_imp__DeleteDC_at_4'
collect2: error: ld returned 1 exit status
make[2]: *** [curl.exe] Error 1
make[2]: Leaving directory `/path/to/mingw32/libcurl/curl-7.35.0/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/path/to/mingw32/libcurl/curl-7.35.0/src'
make: *** [all-recursive] Error 1
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-02-17