Boost logo

Boost Users :

Subject: Re: [Boost-users] Multiple definition error with boost::icl
From: Joachim Faulhaber (afojgo_at_[hidden])
Date: 2012-03-26 15:50:11


Hi Rajalakshmi,

2012/3/23, Rajalakshmi Iyer <raj_at_[hidden]>:
> Hello,
>
> I have the following code structure:
>
> Range.h:
> ------------
> #ifndef __RANGE_H__
> #define __RANGE_H__
>
> #include <boost/icl/interval_map.hpp>
> #include <boost/icl/gregorian.hpp>
>
> using namespace boost::gregorian;
> using namespace boost::icl;
>
> class Range
> {
> public:
> Range() ;
> ~Range() ;
>
> private:
> interval_map< date, int > m_mapRange
> };
>
> #endif // __CAMPAIGNS_BY_RANGE_H__
[...]
> When I build this code, I see the following errors:
>
> main.o: In function `boost::icl::operator++(boost::gregorian::date&)':
> main.cpp:(.text+0x0): multiple definition of
> `boost::icl::operator++(boost::gregorian::date&)'
[...]
>
> Any ideas on how to resolve this would be greatly appreciated.
>

thank you for sending in this report. It is a problem in the adapter
code in boost/icl/gregorian.hpp. For operators ++ and -- that are
implemented for gregorian::date the keyword 'inline' is missing :(
The same problem exitsts for boost/icl/ptime.

Either you provide the missing keyword yourself in your boost version
or you apply the patchfiles attached. I'll fix the issue in the boost
trunk.

Cheers,
Joachim

-- 
Interval Container Library [Boost.Icl]
http://www.joachim-faulhaber.de





Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net