我想從我的Windows DLL項目中使用源編譯cURL。對於這一點,我安裝在虛擬機與Ubuntu,從http://curl.haxx.se/download/curl-7.37.0.tar.bz2下載捲曲源,解壓縮,並將其配置是這樣的:最小cURL交叉編譯窗口
./configure --prefix=$HOME/devel/curl3 --disable-ftp --disable-file\
--disable-ldap --disable-dict --disable-telnet --disable-tftp\
--disable-rtsp --disable-pop3 --disable-imap --disable-smtp\
--disable-gopher --disable-ares --disable-debug --without-ssl\
--without-zlib --without-libidn --build=i586-pc-linux-gnu\
--host=i386-pc-mingw32 --disable-shared
所以我有這樣的輸出:
configure: Configured to build curl/libcurl:
curl version: 7.37.0
Host setup: i386-pc-mingw32
Install prefix: /home/victor/devel/curl3
Compiler: gcc
SSL support: no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls,winssl,darwinssl})
SSH support: no (--with-libssh2)
zlib support: no (--with-zlib)
GSS-API 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: no
ca cert path: no
LDAP support: no (--enable-ldap/--with-ldap-lib/--with-lber-lib)
LDAPS support: no (--enable-ldaps)
RTSP support: no (--enable-rtsp)
RTMP support: no (--with-librtmp)
metalink support: no (--with-libmetalink)
HTTP2 support: disabled (--with-nghttp2)
Protocols: HTTP
然後,我只是做化妝&使安裝創建文件(libcurl.a和include/curl/)*。 一切運行良好,但問題是:當我導入生成的文件時,缺少一個標頭: sys/socket.h。這個頭文件不是乾淨的MingW32安裝的一部分,因此,帶有--host = i386-pc-mingw32的configure命令不需要它,因爲windows使用winsock,對吧?
缺少什麼我在這裏?
對不起,長時間提問,並提前致謝。