Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2005-10-21 11:06:41


On Fri, 21 Oct 2005 08:56:05 +0200, Markus Schöpflin wrote
> Renan Polo Montebelo wrote:
>
> > In fact, I'm using Automatic Linking on Windows
(http://www.boost.org/more/getting_started.html#auto-link).
> > And I'm sure it's linking because I tested it with # define
BOOST_LIB_DIAGNOSTIC.
> >
> > And if I don't use boost::gregorian::from_string(), things work fine.
>
> Hmm, can you please post a minimal compilable example that exhibits
> this behaviour, then?

Sorry to be so slow in response, but this behavior is actually explainable.
In 1.33, date-time is almost entirely a header library. In fact, the
from_string() functions are about the only thing that need things from the
library. So more than likely his setup for library linking is incorrect.
Note that I'd rewrite from_string to use the new i/o code except that it works
on older compilers while the new i/o code doesn't. But in 1.34 I'll likely do
that b/c I"m going to drop support for old compilers.

I might suggest if you want to work around this you can use streaming instead:

  std::stringstream ss(...);
  date d;
  ss >> d;

Jeff


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