It's most probably because OptionContainer.inl is linked twice.
OptionContainer.hpp has the line
#include "OptionContainer.inl" at the end of the file, so
OptionContainer.inl will be compiled and linked with the first .cpp
that includes OptionContainer.hpp. Therefore you shouldn't compile and
link OptionContainer.inl to the project yourself, rather it should be
treated like a header file in the make file. If there is
OptionContainer.inl in your makefile try removing it and it may work.
(1)
Another point is that Options.hpp does not have
#ifndef OPTIONS_HPP
#define OPTIONS_HPP
#endif
lines. I thought about adding them but I didn't add in case it is
deliberate. And Options.hpp includes OptionContainer.inl through this
include chain:
Options.hpp -> Option.hpp -> OptionContainer.hpp -> OptionContainer.inl
Therefore it may be possible that if you have Options.hpp included in
your project and it is not included after curlpp header files
Option.hpp, OptionContainer.hpp, OptionContainer.inl or any other
header file that includes these, then you might get that linker error.
So you can add the #ifndef etc. compiler directives to Options.hpp,
recompile curlpp and try compiling your project that way (2)
If (1) and (2) don't help, and you can replicate the error in a small
sample program I'll be happy to look at it.
-Gazi
On 17/03/07, Свет>г>р Викт>р Ле>нид>вич <victor_at_spy-soft.com> wrote:
> Hi!
>
>
> I get patched curlpp library from yor site and get multiple error while linked my project:
>
> ./GBSearch.o:/usr/local/include/curlpp/OptionContainer.inl first defined here TextSearch line 62 1174139226770 5797
> ./GBSearch.o:/usr/local/include/curlpp/OptionContainer.inl first defined here TextSearch line 68 1174139226761 5795
> ./GBSearch.o:/usr/local/include/curlpp/OptionContainer.inl first defined here TextSearch line 74 1174139226761 5793
> ./GBSearch.o:/usr/local/include/curlpp/OptionContainer.inl first defined here TextSearch line 80 1174139226760 5791
> ./GBSearch.o:/usr/local/include/curlpp/OptionContainer.inl first defined here TextSearch line 86 1174139226760 5789
> /usr/local/include/curlpp/Form.hpp multiple definition of `cURLpp::OptionContainer<std::list<cURLpp::FormPart*, std::allocator<cURLpp::FormPart*> > >::getHandleOptionValue()' TextSearch line 43 1174139226760 5788
> /usr/local/include/curlpp/OptionContainer.inl multiple definition of `cURLpp::OptionContainer<std::list<cURLpp::FormPart*, std::allocator<cURLpp::FormPart*> > >::getValue()' TextSearch line 80 1174139226760 5790
> /usr/local/include/curlpp/OptionContainer.inl multiple definition of `cURLpp::OptionContainer<std::list<cURLpp::FormPart*, std::allocator<cURLpp::FormPart*> > >::OptionContainer(cURLpp::OptionContainer<std::list<cURLpp::FormPart*, std::allocator<cURLpp::FormPart*> > >&)' TextSearch line 68 1174139226761 5794
> /usr/local/include/curlpp/OptionContainer.inl multiple definition of `cURLpp::OptionContainer<std::list<cURLpp::FormPart*, std::allocator<cURLpp::FormPart*> > >::OptionContainer(std::list<cURLpp::FormPart*, std::allocator<cURLpp::FormPart*> > const&)' TextSearch line 62 1174139226761 5796
> /usr/local/include/curlpp/OptionContainer.inl multiple definition of `cURLpp::OptionContainer<std::list<cURLpp::FormPart*, std::allocator<cURLpp::FormPart*> > >::setValue(std::list<cURLpp::FormPart*, std::allocator<cURLpp::FormPart*> > const&)' TextSearch line 74 1174139226761 5792
>
>
> -----Original Message-----
> From: curlpp-bounces_at_rrette.com [mailto:curlpp-bounces_at_rrette.com] On Behalf Of Gazi Alankus
> Sent: Wednesday, February 28, 2007 3:27 PM
> To: cURLpp's mailing-list
> Subject: Re: [cURLpp] No HTTP POST support
>
> Forgot the attachments.
>
> -Gazi
> _______________________________________________
> cURLpp mailing list
> cURLpp_at_rrette.com
> http://www.rrette.com/mailman/listinfo/curlpp
>
_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp
Received on 2007-03-17