cURL / Mailing Lists / curl-library / Single Mail


PRoblem with curl.h header

From: Dev Uniways <>
Date: Wed, 17 Dec 2003 16:31:04 +0100


I used the simple.c example supplied by cUrl
I still get the following message

simple.c:3:37: curl/include/curl/curl.h: No such file or dire
simple.c: In function `main':
simple.c:7: `CURL' undeclared (first use in this function)
simple.c:7: (Each undeclared identifier is reported only once
simple.c:7: for each function it appears in.)
simple.c:7: `curl' undeclared (first use in this function)
simple.c:8: `CURLcode' undeclared (first use in this function
simple.c:8: parse error before "res"
simple.c:12: `CURLOPT_URL' undeclared (first use in this func
simple.c:13: `res' undeclared (first use in this function)

If because the curl.h is a bad header where can I get the right one ???

I used curl-7.10.8.tar.gz supplied by

I even tried to compile in the directory where the curl.h is .

any suggstion

Kind regards


the code is

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

 int main(void)
   CURL *curl;
   CURLcode res;

 curl = curl_easy_init();
   if(curl) {
     curl_easy_setopt(curl, CURLOPT_URL, "");
   res = curl_easy_perform(curl);

   /* always cleanup */
  return 0;

when I try to compile

 cc -o simple simple.c

I get the following message

This email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now!
Received on 2003-12-17