cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Progress function

From: Vadim Lebedev <vadim_at_mbdsys.com>
Date: Fri, 14 Apr 2006 16:40:38 +0200

Jérémie Noguer wrote:

> Hi,
>
> I'm using libcurl since 2 days and I experience a little problem with
> the progress meter.
>
> I wrote my progress callback
>
> int progress_func(void* ptr, double rDlTotal, double rDlNow, double
> rUlTotal, double rUlNow)
> {...
> ...}
>
> and when I set up the curl handle, I call
>
> ...
> curl_easy_setopt(upload, CURLOPT_NOPROGRESS, FALSE);
> curl_easy_setopt(upload, CURLOPT_PROGRESSFUNCTION, progress_func);
> ...
>
> But when I compile I got an error : "Invalid use of member (did you
> forgert the '&' ?)"
> I tried many things but I can't get rid of that one.
>
> Can anyone help ?
>
> Regards

Jeremie,

I suppose you compiling a C++ code... Right?
your progress_func is non static meber of some class?
If so add the keyword 'static' befaure declaration of progress_func

Vadim
Received on 2006-04-14