Boost logo

Boost :

From: Duane Hebert (duaneh_at_[hidden])
Date: 2003-11-03 12:14:35


I'm using BCB6 w/patch 4
Boost libraries boost-1.30.2

This bit of code below causes linker errors:

[Linker Error] Unresolved external
'boost::gregorian::greg_month::as_short_string() const' referenced from
C:\BUILDER\PROJECTS\UNIT1.OBJ
[Linker Error] Unresolved external
'boost::gregorian::greg_month::as_long_string() const' referenced from
C:\BUILDER\PROJECTS\UNIT1.OBJ

via the call to to_iso_string(ptime). What am I missing?

#pragma option push -w-8026
#pragma option push -w-8027

#include "boost/date_time/gregorian/gregorian.hpp"
#include "boost/date_time/posix_time/time_formatters.hpp"
#include "boost/date_time/posix_time/posix_time.hpp"

#pragma option pop
#pragma option pop

#include <string>
#include <iostream>
int main(int argc, char* argv[])
{
        //using namespace boost::posix_time;
        //using namespace boost::gregorian;

        boost::posix_time::ptime
t(boost::posix_time::second_clock::local_time());
        std::string s(boost::posix_time::to_iso_string(t));
        std::cout << s << std::endl;
        std::system("pause");

        return 0;
}

...


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