Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2003-03-21 08:05:10


> gcc testgregorian_calendar.cpp -I/home/tony/work/boost_1_29_0/ -lstdc++
>
> It gives many linking problems, such as,
>
> /tmp/ccMBFqqI.o: In function `main':
> /tmp/ccMBFqqI.o(.text+0x154): undefined reference to
> `boost::date_time::gregorian_calendar_base<boost::date_time::year_month_day_base<unsigned
> long, unsigned short, unsigned short>, unsigned
> long>::day_of_week(boost::date_time::year_month_day_base<unsigned long,
> unsigned short, unsigned short> const&)'
> /tmp/ccMBFqqI.o(.text+0x23a): undefined reference to
> `boost::date_time::gregorian_calendar_base<boost::date_time::year_month_day_base<unsigned
> long, unsigned short, unsigned short>, unsigned
> long>::day_of_week(boost::date_time::year_month_day_base<unsigned long,
> unsigned short, unsigned short> const&)'
>
> I have tested with both gcc3.02 and gcc2.96 under Red Hat 7.2
>
> Did I do anything wrong? Thank you.

Yes, with 1.29 you will need to link in libboost_date_time.a and
make sure the DATE_TIME_INLINE is defined. There is some description
in the docs about this. If you upgrade to 1.30 you can drop the
DATE_TIME_INLINE defines.

Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk