cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: your mail

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 23 Apr 2003 10:31:05 +0200 (CEST)

On Sat, 1 Feb 2003, lupusdacicus wrote:

> I want to read from a file the parameters for easy_curl. The file is like
> this:
> curl_option_name curl_option_value
>
> Since I couldn't find a way to get the perl version of libcurl installed on
> my computer and since Juno does not let you connect to their server from
> Linux, I need to find a way to use libcurl from C.

libcurl is a C library. There are plenty of examples showing how to use it
from within your C programs.

> What I have in mind is to still use perl, but to use a C program to work
> with curl/libcurl.

Perhaps invoke the curl tool using perl?

> I am trying to:
> curl_easy_setopt(curl, name, value);
> but I get:
> C:\Project\vc++\t3.cpp(28) : error C2664: 'curl_easy_setopt' : cannot
> convert parameter 2 from 'char *' to 'CURLoption'
> and I can't figure out how can I specify the curl option name and curl
> option value from a char/variable.

The second argument needs to be the numerical value defined in the
curl/curl.h header file, not a string.

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-04-23