|
Boost Users : |
From: Jimmy Pritts (jpritts_at_[hidden])
Date: 2003-05-07 05:12:31
I have boost 1.29 and gcc 3.2.2 on Linux. Here is the simple
code I am trying to compile:
#include <string>
#include "boost/date_time/gregorian/gregorian.hpp"
int main()
{
using namespace std;
using namespace boost::gregorian;
string ds("2002/1/25");
date d1(from_string(ds));
return 0;
}
I get the following link error:
make
g++ main.cc -lstdc++ -o test
/tmp/ccph1inq.o(.gnu.linkonce.t._ZN5boost9date_time4dateINS_9gregorian4dateENS2_18gregorian_calendarENS0_13date_durationIlEEEC2ERKNS0_19year_month_day_baseINS2_9greg_yearENS2_10greg_monthENS2_8greg_dayEEE+0x11): In function `boost::date_time::date<boost::gregorian::date, boost::gregorian::gregorian_calendar, boost::date_time::date_duration<long> >::date[not-in-charge](boost::date_time::year_month_day_base<boost::gregorian::greg_year, boost::gregorian::greg_month, boost::gregorian::greg_day> const&)':
: undefined reference to `boost::date_time::gregorian_calendar_base<boost::date_time::year_month_day_base<boost::gregorian::greg_year, boost::gregorian::greg_month, boost::gregorian::greg_day>, unsigned long>::day_number(boost::date_time::year_month_day_base<boost::gregorian::greg_year, boost::gregorian::greg_month, boost::gregorian::greg_day> const&)'
collect2: ld returned 1 exit status
make: *** [test] Error 1
The missing symbol does not seem to be in the static library libboost_date_time.a, so I don't think I need to link to that. Any suggestions?
Thanks in advance,
Jimmy.
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