curl-library
(pas de sujet)
Date: Fri, 04 May 2007 12:21:22 +0200
Hello,
I compiled the libary libcurl 7.16.1 with the ssl support
curl version: 7.16.1
Host setup: i686-pc-mingw32
Install prefix: /usr/local
Compiler: gcc
* SSL support: enabled (OpenSSL)*
SSH support: no (--with-libssh2)
zlib support: no (--with-zlib)
krb4 support: no (--with-krb4*)
GSSAPI support: no (--with-gssapi)
SPNEGO support: no (--with-spnego)
c-ares support: no (--enable-ares)
ipv6 support: no (--enable-ipv6)
IDN support: no (--with-libidn)
Build libcurl: Shared=yes, Static=yes
Built-in manual: no (--enable-manual)
Verbose errors: enabled (--disable-verbose)
SSPI support: no (--enable-sspi)
i use openssl 0.97m
when i tape curl-config --feature in my terminal i have this :
$ curl-config --feature
SSL
NTLM
Well all seems ok! i take a sample from the curl website
#include <stdio.h>
#include <curl/curl.h>
int main(void)
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl)
{
curl_easy_setopt(curl, CURLOPT_URL, "https://sourceforge.net/");
#ifdef SKIP_PEER_VERIFICATION
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
#endif
#ifdef SKIP_HOSTNAME_VERFICATION
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
#endif
url_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
return 0;
}
i compiled it with this line
gcc -o testHTTPS.exe ./testHTTPS.cc `curl-config --cflags` `curl-config
--libs`
and the the compilation is working ! now when i try to execute my
programm i have an error message
$ ./testHTTPS.exe
* libcurl was built with SSL disabled, https: not supported!
* unsupported protocol
so i don't know from where came the problem because the ssl is enable !!!
if somebody know something about that !! that could be cool !!
rq : echo gcc -o testHTTPS.exe ./testHTTPS.cc `curl-config --cflags`
`curl-config --libs`
gcc -o testHTTPS.exe ./testHTTPS.cc -I/usr/local/include
-L/usr/local/lib -lcurl -L/usr/local/ssl/lib -lssl -lcrypto -lgdi32
-lwinmm -lws2_32 -lws2_32
Best regard jérémy
- text/x-vcard attachment: jlefevre.vcf