Просмотр полной версии : как собрать curl для mingw с поддержкой SSL (для https) ?
обычный курл работает нормально
но если дать ему урл, начинающийся с https://
получаю:
Error: [ 1 ] - Protocol https not supported or disabled in libcurl
Скачал libcurl-7.17.1-win32-ssl
но там нечего компилировать.
Так и не нашёл нормальных исходников в которых есть поддержка SSL
Или надо собрать обычные исходники с каким-то параметром?
Сейчас компилирую простой командой
C:\...\minwg\bin\mingw32-make.exe mingw32
смотри файл INSTALL секцию MingW32
Make sure that MinGW32's bin dir is in the search path, for example:
set PATH=c:\mingw32\bin;%PATH%
then run 'mingw32-make mingw32' in the root dir. There are other
make targets available to build libcurl with more features, use:
'mingw32-make mingw32-zlib' to build with Zlib support;
'mingw32-make mingw32-ssl-zlib' to build with SSL and Zlib enabled;
'mingw32-make mingw32-ssh2-ssl-zlib' to build with SSH2, SSL, Zlib;
'mingw32-make mingw32-ssh2-ssl-sspi-zlib' to build with SSH2, SSL, Zlib
and SSPI support.
C:\curl>C:\Qt_2010.01\mingw\bin\mingw32-make mingw32-ssl-zlib
C:/Qt_2010.01/mingw/bin/mingw32-make -C lib -f Makefile.m32 SSL=1 ZLIB=1
mingw32-make[1]: Entering directory `C:/curl/lib'
gcc -I. -I../include -I"../../openssl-0.9.8k/outinc" -I"../../openssl-0.9.8k/out
inc/openssl" -I"../../zlib-1.2.3" -g -O2 -DBUILDING_LIBCURL -DUSE_SSLEAY -DUSE_O
PENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H -DHAVE_ENGINE_LOAD_BUILTI
N_ENGINES -DOPENSSL_NO_KRB5 -DCURL_WANTS_CA_BUNDLE_ENV -DHAVE_LIBZ -DHAVE_ZLIB_H
-c formdata.c
In file included from formdata.c:121:
urldata.h:59:25: error: openssl/rsa.h: No such file or directory
urldata.h:60:28: error: openssl/crypto.h: No such file or directory
urldata.h:61:26: error: openssl/x509.h: No such file or directory
urldata.h:62:25: error: openssl/pem.h: No such file or directory
urldata.h:63:25: error: openssl/ssl.h: No such file or directory
urldata.h:64:25: error: openssl/err.h: No such file or directory
urldata.h:66:28: error: openssl/engine.h: No such file or directory
urldata.h:69:28: error: openssl/pkcs12.h: No such file or directory
urldata.h:110:59: error: zlib.h: No such file or directory
In file included from formdata.c:121:
urldata.h:206: error: expected specifier-qualifier-list before 'SSL_CTX'
urldata.h:783: error: expected specifier-qualifier-list before 'z_stream'
urldata.h:1269: error: expected specifier-qualifier-list before 'ENGINE'
mingw32-make[1]: *** [formdata.o] Error 1
mingw32-make[1]: Leaving directory `C:/curl/lib'
mingw32-make: *** [mingw32-ssl-zlib] Error 2
на сайте http://curl.haxx.se/download.html#openssl
есть "Windows 0.9.8g mingw 7z"
но она 404
где взять сорцы курла с SSL?
c SSL разобрался
скачал zlib http://www.zlib.net/zlib123.zip
все *.с и *.h из него закинул в curl-7.19.7\include\
после этого получил такие ошибки:
...
gcc -I. -I../include -I"../../openssl-0.9.8k/outinc" -I"../../openssl-0.9.8k/out
inc/openssl" -I"../../zlib-1.2.3" -g -O2 -DBUILDING_LIBCURL -DUSE_SSLEAY -DUSE_O
PENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H -DHAVE_ENGINE_LOAD_BUILTI
N_ENGINES -DOPENSSL_NO_KRB5 -DCURL_WANTS_CA_BUNDLE_ENV -DHAVE_LIBZ -DHAVE_ZLIB_H
-c socks_sspi.c
gcc -I. -I../include -I"../../openssl-0.9.8k/outinc" -I"../../openssl-0.9.8k/out
inc/openssl" -I"../../zlib-1.2.3" -g -O2 -DBUILDING_LIBCURL -DUSE_SSLEAY -DUSE_O
PENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H -DHAVE_ENGINE_LOAD_BUILTI
N_ENGINES -DOPENSSL_NO_KRB5 -DCURL_WANTS_CA_BUNDLE_ENV -DHAVE_LIBZ -DHAVE_ZLIB_H
-c curl_sspi.c
gcc -I. -I../include -I"../../openssl-0.9.8k/outinc" -I"../../openssl-0.9.8k/out
inc/openssl" -I"../../zlib-1.2.3" -g -O2 -DBUILDING_LIBCURL -DUSE_SSLEAY -DUSE_O
PENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H -DHAVE_ENGINE_LOAD_BUILTI
N_ENGINES -DOPENSSL_NO_KRB5 -DCURL_WANTS_CA_BUNDLE_ENV -DHAVE_LIBZ -DHAVE_ZLIB_H
-c slist.c
gcc -I. -I../include -I"../../openssl-0.9.8k/outinc" -I"../../openssl-0.9.8k/out
inc/openssl" -I"../../zlib-1.2.3" -g -O2 -DBUILDING_LIBCURL -DUSE_SSLEAY -DUSE_O
PENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H -DHAVE_ENGINE_LOAD_BUILTI
N_ENGINES -DOPENSSL_NO_KRB5 -DCURL_WANTS_CA_BUNDLE_ENV -DHAVE_LIBZ -DHAVE_ZLIB_H
-c nonblock.c
gcc -I. -I../include -I"../../openssl-0.9.8k/outinc" -I"../../openssl-0.9.8k/out
inc/openssl" -I"../../zlib-1.2.3" -g -O2 -DBUILDING_LIBCURL -DUSE_SSLEAY -DUSE_O
PENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H -DHAVE_ENGINE_LOAD_BUILTI
N_ENGINES -DOPENSSL_NO_KRB5 -DCURL_WANTS_CA_BUNDLE_ENV -DHAVE_LIBZ -DHAVE_ZLIB_H
-c curl_memrchr.c
del /q /f > NUL 2>&1 libcurl.a
ar cru libcurl.a file.o timeval.o base64.o hostip.o progress.o formdata.o cookie
.o http.o sendf.o ftp.o url.o dict.o if2ip.o speedcheck.o ldap.o ssluse.o versio
n.o getenv.o escape.o mprintf.o telnet.o netrc.o getinfo.o transfer.o strequal.o
easy.o security.o krb4.o krb5.o memdebug.o http_chunks.o strtok.o connect.o lli
st.o hash.o multi.o content_encoding.o share.o http_digest.o md5.o curl_rand.o h
ttp_negotiate.o http_ntlm.o inet_pton.o strtoofft.o strerror.o hostares.o hostas
yn.o hostip4.o hostip6.o hostsyn.o hostthre.o inet_ntop.o parsedate.o select.o g
tls.o sslgen.o tftp.o splay.o strdup.o socks.o ssh.o nss.o qssl.o rawstr.o curl_
addrinfo.o socks_gssapi.o socks_sspi.o curl_sspi.o slist.o nonblock.o curl_memrc
hr.o
ranlib libcurl.a
strip -g libcurl.a
windres --include-dir=../include -DDEBUGBUILD=0 -O COFF -i libcurl.rc -o libcurl
.res
del /q /f > NUL 2>&1 libcurl.dll
gcc -s -shared -Wl,--out-implib,libcurldll.a \
-o libcurl.dll file.o timeval.o base64.o hostip.o progress.o formdata.
o cookie.o http.o sendf.o ftp.o url.o dict.o if2ip.o speedcheck.o ldap.o ssluse.
o version.o getenv.o escape.o mprintf.o telnet.o netrc.o getinfo.o transfer.o st
requal.o easy.o security.o krb4.o krb5.o memdebug.o http_chunks.o strtok.o conne
ct.o llist.o hash.o multi.o content_encoding.o share.o http_digest.o md5.o curl_
rand.o http_negotiate.o http_ntlm.o inet_pton.o strtoofft.o strerror.o hostares.
o hostasyn.o hostip4.o hostip6.o hostsyn.o hostthre.o inet_ntop.o parsedate.o se
lect.o gtls.o sslgen.o tftp.o splay.o strdup.o socks.o ssh.o nss.o qssl.o rawstr
.o curl_addrinfo.o socks_gssapi.o socks_sspi.o curl_sspi.o slist.o nonblock.o cu
rl_memrchr.o libcurl.res -L../../openssl-0.9.8k/out -leay32 -lssl32 -L../../zlib
-1.2.3 -lz -lwldap32 -lws2_32
c:/qt_2010.01/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe:
cannot find -leay32
collect2: ld returned 1 exit status
mingw32-make[1]: *** [libcurl.dll] Error 1
mingw32-make[1]: Leaving directory `C:/curl-7.19.7/curl-7.19.7/lib'
mingw32-make: *** [mingw32-ssl-zlib] Error 2
c:/qt_2010.01/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe:
cannot find -lz
collect2: ld returned 1 exit status
mingw32-make[1]: *** [libcurl.dll] Error 1
mingw32-make[1]: Leaving directory `C:/curl-7.19.7/curl-7.19.7/lib'
mingw32-make: *** [mingw32-ssl-zlib] Error 2
где найти libz.a ?
скомпилил zlib с помощью msys, получил libz.a
но всё равно не могу скомпилировать сам курл:
encrypt'
C:\curl-7.19.7\curl-7.19.7\lib/http_ntlm.c:383: undefined reference to `DES_ecb_
encrypt'
C:\curl-7.19.7\curl-7.19.7\lib/http_ntlm.c:387: undefined reference to `DES_ecb_
encrypt'
http_ntlm.o: In function `mk_lm_hash':
C:\curl-7.19.7\curl-7.19.7\lib/http_ntlm.c:444: undefined reference to `DES_ecb_
encrypt'
C:\curl-7.19.7\curl-7.19.7\lib/http_ntlm.c:448: undefined reference to `DES_ecb_
encrypt'
http_ntlm.o: In function `Curl_output_ntlm':
C:\curl-7.19.7\curl-7.19.7\lib/http_ntlm.c:913: undefined reference to `RAND_byt
es'
C:\curl-7.19.7\curl-7.19.7\lib/http_ntlm.c:930: undefined reference to `MD5_Init
'
C:\curl-7.19.7\curl-7.19.7\lib/http_ntlm.c:931: undefined reference to `MD5_Upda
te'
C:\curl-7.19.7\curl-7.19.7\lib/http_ntlm.c:932: undefined reference to `MD5_Fina
l'
vBulletin® v3.8.14, Copyright ©2000-2026, vBulletin Solutions, Inc. Перевод: zCarot