curl-library
RE: curl binary OK libcurl NOK
Date: Fri, 17 Oct 2008 09:39:42 +0200
* About to connect() to proxy my.proxy.se port 8080 (#0)
* Trying 153.88.253.11... * Failed to connect to 153.88.253.11: Error
0
* Error 0
* couldn't connect to host
* Closing connection #0
Res 7
"Res 7" is me printing the easy_perform result.
Not much to go on..
BR
Robert
-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Wei Weng
Sent: den 17 oktober 2008 00:56
To: libcurl development
Subject: Re: curl binary OK libcurl NOK
Robert Thorhuus wrote:
> Hello!
>
> This is my first time using libcurl. I downloaded the source code for
> 7.19.0.
>
> I start with just telling the real problem. Using the downloaded curl
> binary I can do:
> curl -x my.proxy.se:8080 _www.google.se_ <file://www.google.se>
>
> This works.
>
> Now I do
> curl = curl_easy_init();
> if(curl)
> {
> curl_easy_setopt(curl, CURLOPT_PROXY, "my.proxy.se:8080");
> curl_easy_setopt(curl, CURLOPT_URL, "www.google.se");
> res = curl_easy_perform(curl);
> curl_easy_cleanup(curl);
> }
>
>
> This results in a error code 7 = CURLE_COULDNT_CONNECT (7)
>
> What can be the difference?
>
> I installed curl with this configure line:
> ./configure --without-nss --without-gnutls --without-zlib
> --without-ssl --disable-crypto-auth --disable-tftp --disable-telnet
> --disable-dict --disable-ldap --disable-ftp
>
> BR
> Robert
>
Robert,
what does it say if you enable the VERBOSE output?
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
Thanks
Wei
Received on 2008-10-17