Boost logo

Boost :

Subject: Re: [boost] BOOST_DATE_TIME_NO_LIB
From: Marshall Clow (mclow.lists_at_[hidden])
Date: 2011-07-12 10:35:12


On Jul 12, 2011, at 7:18 AM, <gpolo1_at_[hidden]> <gpolo1_at_[hidden]> wrote:

> Without the #define, boost tries to automatically link with the appropriate library. It just so happens that my boost installation does not have this library. So I was wondering if I even need this library? Aren't all boost classes compiled via hpp. I #defined BOOST_DATE_TIME_NO_LIB in my header file and the program compiles and works fine. So what is the purpose of this definition. I am using boost 1.32 along with Visual Studio 6.0. I have compiled it on Linux successfully, but I have not ran it yet.

No - not all Boost classes are compiled via hpp (aka "header-only").
Some boost libraries are compiled separately, and must be linked in.

Date-time is a hybrid. Some of the functionality is in header files, and if that's all that you use, then you can #define BOOST_DATE_TIME_NO_LIB, and continue on your merry way. However, if you use other parts of date-time, then you'll have to link against the prebuilt library.

See http://www.boost.org/doc/libs/1_47_0/libs/config/doc/html/index.html , under "User Settable Options"

-- Marshall

Marshall Clow Idio Software <mailto:mclow.lists_at_[hidden]>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki


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