cURL / Mailing Lists / curl-library / Single Mail


problem using cURL (fwd)

From: Daniel Stenberg <>
Date: Wed, 17 Dec 2003 15:50:11 +0100 (CET)

(this was sent to curl-library-admin, probably by mistake)

    Daniel Stenberg -- --
   [[ Do not send mails to this email address. They won't reach me. ]]
---------- Forwarded message ----------
Date: Wed, 17 Dec 2003 15:48:33 +0100
From: Dev Uniways <>
Subject: problem using cURL
Dear Sir,
I would like to use cURl in my application
I used one of your example , when I try to compile my application in c
I get this error
[root_at_unilinux c]# cc test1.c -o test1
test1.c:6:36: curl/include/curl/curl.h: No such file or directory
test1.c: In function `main':
test1.c:13: `URL_FILE' undeclared (first use in this function)
test1.c:13: (Each undeclared identifier is reported only once
test1.c:13: for each function it appears in.)
test1.c:13: `handle' undeclared (first use in this function)
test1.c:53: parse error at end of input
I would like to assure your that curl.h is in curl/include/curl/
Kind regards
Charles Boudjada
my code is
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <stdlib.h>
#include <errno.h>
#include <curl/include/curl/curl.h>
 main(int argc, char *argv[])
    URL_FILE *handle;
     FILE *outf;
     int nread;
    char buffer[256];
     char *url;
    if(argc < 2)
         url="";/* default to testurl */
       url=argv[1];/* use passed url */
     /* Copy from url with fread */
        perror("couldnt open fread output file\n");
       return 1;
     handle = url_fopen(url, "r");
     if(!handle) {
         printf("couldn't url_fopen()\n");
        return 2;
     do {
        nread = url_fread(buffer, 1,sizeof(buffer), handle);
     } while(nread);
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