Boost logo

Boost Users :

From: Istvan Buki (istvan.buki_at_[hidden])
Date: 2003-11-06 10:20:09


Hello,

here is a small piece of code that use the posix_time system that fails
to compile.
I'm wondering whether it is a bug in the library or my usage of the
library that is wrong.

Thank you for your help.
Istvan

#include "boost/date_time/posix_time/posix_time.hpp"
#include <iostream>

int main()
{
   using namespace boost::posix_time ;

   ptime now = microsec_clock::local_time();
   std::cout << to_simple_string( now ) << std::endl ;

   return 0 ;
}

g++ -I/opt/boost brol.cpp
/tmp/ccQQjwdW.o(.gnu.linkonce.t._ZN5boost9date_time15month_formatterINS_9gregorian10greg_monthENS0_13simple_formatEE12format_monthERKS3_RSo+0x3a):
In function
`boost::date_time::month_formatter<boost::gregorian::greg_month,
boost::date_time::simple_format>::format_month(boost::gregorian::greg_month
const&, std::basic_ostream<char, std::char_traits<char> >&)':
: undefined reference to
`boost::gregorian::greg_month::as_short_string() const'
/tmp/ccQQjwdW.o(.gnu.linkonce.t._ZN5boost9date_time15month_formatterINS_9gregorian10greg_monthENS0_13simple_formatEE12format_monthERKS3_RSo+0x5c):
In function
`boost::date_time::month_formatter<boost::gregorian::greg_month,
boost::date_time::simple_format>::format_month(boost::gregorian::greg_month
const&, std::basic_ostream<char, std::char_traits<char> >&)':
: undefined reference to `boost::gregorian::greg_month::as_long_string()
const'
collect2: ld returned 1 exit status

The system is running SuSE linux 9.0
compiler: gcc 3.3.1
boost version 1.30.2


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