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] Multiple #include results in error

From: thomas <vidvandre>
Date: Sat Apr 2 11:30:30 2005

Hi.

When I #include cURLpp.hpp and Options.hpp in more than one .cc file
I get this error when compiling:

rr.o(.text+0x100): In function
`cURLpp::OptionSetter<std::list<cURLpp::FormPart*,
std::allocator<cURLpp::FormPart*> >,
(cURL::CURLoption)10024>::setOpt(cURLpp::CurlHandle*, cURLpp::HttpPost
const&)':
/usr/include/curlpp/OptionSetter.inl:64: multiple definition of
`cURLpp::OptionSetter<std::list<cURLpp::FormPart*,
std::allocator<cURLpp::FormPart*> >,
(cURL::CURLoption)10024>::setOpt(cURLpp::CurlHandle*, cURLpp::HttpPost
const&)'
ezt.o(.text+0x100):/usr/include/curlpp/OptionSetter.inl:64: first defined here
collect2: ld returned 1 exit status
make: *** [all] Error 1

I include cURLpp.hpp and Options.hpp in both ezt.cc and rr.cc.
When commenting out the #includes in one of them, the compilation succeeds, but
I won't be able to use cURLpp in that file.

Am I doing something wrong here.. or is it supposed to be like this ?

I'm using curlpp-0.5.0-rc4 with GCC version 3.3.4.

Everything else seems to work like a dream though :)

Thomas
Received on 2005-03-15

These mail archives are generated by hypermail.

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

File upload with ASP.NET