title: Compiling libcurl for mingw32 (Windows) on mac os x 10.6
body: <p>I'm compiling libcurl for mingw32 as follows:</p>
  
  <pre><code>./configure --prefix=/Users/daniel/mingw32 "CFLAGS= -ABI=32"
  make
  make install
  </code></pre>
  
  <p>But when compiling a program using mingw32-gcc: </p>
  
  <pre><code>i386-mingw32-gcc -lcurl -o bin/remote-win.exe remote.c
  </code></pre>
  
  <p>i get:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I'm pretty sure the error is because curl_socklen_t does not exist on windows. I've tried --target=<em>-</em>-mingw32 but still no success.</p>
  
  <p>Please help</p>
  
  <p>End of configured for:</p>
  
  <blockquote>
    <p>curl version:    7.21.4   Host setup: 
    x86_64-apple-darwin10.6.0   Install
    prefix:  /Users/daniel/mingw32<br>
    Compiler:        gcc   SSL support:<br>
    enabled (OpenSSL)   SSH support:<br>
    no      (--with-libssh2)   zlib
    support:    enabled   krb4 support:<br>
    no      (--with-krb4*)   GSSAPI
    support:  no      (--with-gssapi)<br>
    SPNEGO support:  no<br>
    (--with-spnego)   TLS-SRP support: no 
    (--enable-tls-srp)   resolver:<br>
    default (--enable-ares /
    --enable-threaded-resolver)   ipv6 support:    enabled   IDN support:<br>
    no      (--with-libidn)   Build
    libcurl:   Shared=yes, Static=yes<br>
    Built-in manual: enabled   Verbose
    errors:  enabled (--disable-verbose)<br>
    SSPI support:    no<br>
    (--enable-sspi)   ca cert bundle:  no 
    ca cert path:    no   LDAP support:<br>
    enabled (OpenLDAP)   LDAPS support:<br>
    enabled   RTSP support:    enabled<br>
    RTMP support:    no<br>
    (--with-librtmp)   Protocols:<br>
    DICT FILE FTP FTPS GOPHER HTTP HTTPS
    IMAP IMAPS LDAP LDAPS POP3 POP3S RTSP
    SMTP SMTPS TELNET TFTP</p>
  </blockquote>