date_time library problem
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
On Thu, 06 Nov 2003 16:20:09 +0100, Istvan Buki wrote
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
You need to build the libboost_datetime.a file using bjam and add it to you command line for linking. Jeff
participants (2)
-
Istvan Buki
-
Jeff Garland