cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem libcurl, no output on console

From: Brian Dessent <brian_at_dessent.net>
Date: Sat, 27 May 2006 01:58:56 -0700

Alberto Glarey wrote:

> #include "stdio.h"
> #include "curl/curl.h"

You should use < > and not " " here.

> if(curl!=NULL){res=curl_easy_setopt(curl,CURLOPT_URL,"http://www.google.com");}
>
> else{printf("error\n");};
>
> curl_easy_cleanup(curl);
>
> return 0;
> }
> -----
>
> im compilig with the following line :
>
> gcc -o main main.c `curl-config --cflags --libs`
>
> i get no errors while compiling.
> running the program i get no errors, but i have NO output on console.

You never call curl_easy_perform, which means that this program doesn't
actually do anything. Maybe you should look at the examples that come
with libcurl.

Brian
Received on 2006-05-27