cURL / Mailing Lists / curl-library / Single Mail

curl-library

PRoblem with curl.h header

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

Hi

I used the simple.c example supplied by cUrl
http://curl.haxx.se/lxr/source/docs/examples/simple.c
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 http://curl.haxx.se/download.html

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

any suggstion

Kind regards

Charles

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, "curl.haxx.se");
   res = curl_easy_perform(curl);

   /* always cleanup */
  curl_easy_cleanup(curl);
   }
  return 0;
 }

when I try to compile

 cc -o simple simple.c

I get the following message

-------------------------------------------------------
This SF.net 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! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-17