Hi, 
I'm trying to link my application against a dynamic library of curl. 

I configure curl as follow (as I need SFTP as a protocol): 

./configure --prefix=... --with-libssh2=... --disable-examples-build 

Nothing real special about it, in "..." is the absolute path I had in my repo. 
Here are the summary: 

curl version: 7.44.0 
Host setup: x86_64-pc-mingw32 
Install prefix: /e/git/qtprojects/agui-branch/app/lib/curl/build 
Compiler: gcc 
SSL support: no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls,winssl,darwinssl} 
) 
SSH support: enabled (libSSH2) 
zlib support: enabled 
GSS-API support: no (--with-gssapi) 
TLS-SRP support: no (--enable-tls-srp) 
resolver: default (--enable-ares / --enable-threaded-resolver) 
IPv6 support: no (--enable-ipv6) 
Unix sockets support: no (--enable-unix-sockets) 
IDN support: no (--with-{libidn,winidn}) 
Build libcurl: Shared=yes, Static=no 
Built-in manual: no (--enable-manual) 
--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: 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 GOPHER HTTP IMAP LDAP LDAPS POP3 RTSP SCP SFTP SMTP 
TELNET TFTP 

However when I compile my application, I'm getting a lot of: 

warning: #warning Please include winsock2.h before windows.h [-Wcpp] 





After searching for a while, I found this as a section of curlbuild.h in 
generated build/ folder 



#define CURL_PULL_WS2TCPIP_H 1 
#ifdef CURL_PULL_WS2TCPIP_H 
# ifndef WIN32_LEAN_AND_MEAN 
# define WIN32_LEAN_AND_MEAN 1 
# endif 
# include <windows.h> 
# include <winsock2.h> 
# include <ws2tcpip.h> 
#endif 

However, even if I switch position of windows.h & winsock2.h, the problem won't 
go away. I'm wondering it may be due to another declaration of winsock2.h in my 
application, or I do anything wrong with the configuration? 
Please, any suggestion would be very welcomed. 

Thank you in advance, 

Best regards, 

-- 

Huy Cong 
06 69 07 97 82 
Wandercraft SAS 
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Reply via email to