cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curlpp mailing list Archives

[cURLpp] cURLpp::Infos::TotalTime

From: Andrey Kravchuk <dushik_at_gmail.com>
Date: Fri, 8 Sep 2006 16:47:51 +0300

It seems that cURLpp implementation (0.7, i'm not sure about dev one)
doesn't have support for info parameters with types other than
std::string.
E.g. when I try to compile code

double totalTime;
cURLpp::Infos::TotalTime::get(request, totalTime);

i got an error

In function `cURLpp::Info<(CURLINFO)3145731,
double>::get(cURLpp::Easy&, double&)':
/usr/include/c++/3.4/bits/stl_list.h:1170: undefined reference to
`cURLpp::InfoTypeConverter<double>::get(cURLpp::Easy&, CURLINFO,
double&)'

This sounds logical as curlpp/Info.cpp does not have one indeed.
Adding the function in curlpp/Info.cpp

template< >
void
cURLpp::InfoTypeConverter< double >::get(cURLpp::Easy &handle,
                              CURLINFO info,
                              double &value)
{
  double tmp;
  InfoGetter::get(handle, info, tmp);
  value = tmp;
}

solves the problem. Sorry I can't provide a patch but i hope that will help.
_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp
Received on 2006-09-08

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET