I'm compiling libcurl for mingw32 as follows:
./configure --prefix=/Users/daniel/mingw32 "CFLAGS= -ABI=32"
make
make install
But when compiling a program using mingw32-gcc:
i386-mingw32-gcc -lcurl -o bin/remote-win.exe remote.c
i get:
In file included from /Users/daniel/mingw32/usr/local/include/curl/curl.h:34,
from remote.c:6:
/Users/daniel/mingw32/usr/local/include/curl/curlbuild.h:152:26: sys/socket.h: No such file or directory
In file included from /Users/daniel/mingw32/usr/local/include/curl/curl.h:34,
from remote.c:6:
/Users/daniel/mingw32/usr/local/include/curl/curlbuild.h:165: error: syntax error before "curl_socklen_t"
In file included from /Users/daniel/mingw32/usr/local/include/curl/curl.h:35,
from remote.c:6:
/Users/daniel/mingw32/usr/local/include/curl/curlrules.h:143: error: size of array `__curl_rule_01__' is negative
/Users/daniel/mingw32/usr/local/include/curl/curlrules.h:153: error: size of array `__curl_rule_02__' is negative
I'm pretty sure the error is because curl_socklen_t does not exist on windows. I've tried --target=--mingw32 but still no success.
Please help
End of configured for:
curl version: 7.21.4 Host setup: x86_64-apple-darwin10.6.0 Install prefix: /Users/daniel/mingw32
Compiler: gcc SSL support:
enabled (OpenSSL) SSH support:
no (--with-libssh2) zlib support: enabled krb4 support:
no (--with-krb4*) 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: enabled IDN support:
no (--with-libidn) Build libcurl: Shared=yes, Static=yes
Built-in manual: enabled Verbose errors: enabled (--disable-verbose)
SSPI support: no
(--enable-sspi) ca cert bundle: no ca cert path: no LDAP support:
enabled (OpenLDAP) LDAPS support:
enabled RTSP support: enabled
RTMP support: no
(--with-librtmp) Protocols:
DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP
"configure: Configured to build curl/libcurl: "
– osgx