curl-library
Postit example doesn't work anymore
Date: Sun, 28 Mar 2004 18:07:55 +0200
I have been using the postit example in my program for some time but now
somone told me that it does not compile with the new libcurl anymore.
Here is part of the example: (it is also on the curl site)
******************8
int main(int argc, char *argv[])
{
CURL *curl;
CURLcode res;
struct HttpPost *formpost=NULL;
struct HttpPost *lastptr=NULL;
struct curl_slist *headerlist=NULL;
char buf[] = "Expect:";
curl_global_init(CURL_GLOBAL_ALL);
/* Fill in the file upload field */
curl_formadd(&formpost,
&lastptr,
CURLFORM_COPYNAME, "filename",
CURLFORM_FILE, "/home/bastiaan/bastiaan.jpg",
CURLFORM_END);
*************************
I get the following error:
postit2.c: In function `main':
postit2.c:48: warning: passing arg 1 of `curl_formadd' from incompatible
pointer type
Can anyone help me here ? And please update the examples on the site.
Thanks,
Bastiaan
Received on 2004-03-28