Multiple definition error with boost::icl

Hello,
I have the following code structure:
Range.h:
------------
#ifndef __RANGE_H__
#define __RANGE_H__
#include

Hi Rajalakshmi,
2012/3/23, Rajalakshmi Iyer
Hello,
I have the following code structure:
Range.h: ------------ #ifndef __RANGE_H__ #define __RANGE_H__
#include
#include 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
participants (2)
-
Joachim Faulhaber
-
Rajalakshmi Iyer