
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.

On Jul 12, 2011, at 7:18 AM, <gpolo1@tampabay.rr.com> <gpolo1@tampabay.rr.com> 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@gmail.com> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki

gpolo1@tampabay.rr.com wrote:
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.
Contrary to what the name might suggest, it just turns autolinking off. Marshall Clow wrote:
See <http://www.boost.org/doc/libs/1_47_0/libs/config/doc/html/index.html>, under "User Settable Options"
Exactly, convince yourself that this macro only controls the autolink feature.

on Tue Jul 12 2011, Thomas Klimpel <Thomas.Klimpel-AT-synopsys.com> wrote:
gpolo1@tampabay.rr.com wrote:
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.
Contrary to what the name might suggest, it just turns autolinking off.
How is it that we haven't renamed these macros to something more suggestive of their meaning by now? Let me try a less rhetorical approach: suppose we rename these things? (We can leave code in place to achieve backward compatibility if necessary). -- Dave Abrahams BoostPro Computing http://www.boostpro.com

On Thu, Jul 14, 2011 at 2:05 PM, Dave Abrahams <dave@boostpro.com> wrote:
on Tue Jul 12 2011, Thomas Klimpel <Thomas.Klimpel-AT-synopsys.com> wrote:
gpolo1@tampabay.rr.com wrote:
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.
Contrary to what the name might suggest, it just turns autolinking off.
How is it that we haven't renamed these macros to something more suggestive of their meaning by now?
Let me try a less rhetorical approach: suppose we rename these things? (We can leave code in place to achieve backward compatibility if necessary).
How about: BOOST_DATE_TIME_AUTOLINK_OFF and for the global: BOOST_ALL_AUTOLINK_OFF --Beman

On Jul 14, 2011, at 11:15 AM, Beman Dawes wrote:
On Thu, Jul 14, 2011 at 2:05 PM, Dave Abrahams <dave@boostpro.com> wrote:
on Tue Jul 12 2011, Thomas Klimpel <Thomas.Klimpel-AT-synopsys.com> wrote:
gpolo1@tampabay.rr.com wrote:
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.
Contrary to what the name might suggest, it just turns autolinking off.
How is it that we haven't renamed these macros to something more suggestive of their meaning by now?
Let me try a less rhetorical approach: suppose we rename these things? (We can leave code in place to achieve backward compatibility if necessary).
How about:
BOOST_DATE_TIME_AUTOLINK_OFF and for the global: BOOST_ALL_AUTOLINK_OFF
--Beman
I like it! -- Marshall Marshall Clow Idio Software <mailto:mclow.lists@gmail.com> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki

on Thu Jul 14 2011, Beman Dawes <bdawes-AT-acm.org> wrote:
On Thu, Jul 14, 2011 at 2:05 PM, Dave Abrahams <dave@boostpro.com> wrote:
on Tue Jul 12 2011, Thomas Klimpel <Thomas.Klimpel-AT-synopsys.com> wrote:
gpolo1@tampabay.rr.com wrote:
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.
Contrary to what the name might suggest, it just turns autolinking off.
How is it that we haven't renamed these macros to something more suggestive of their meaning by now?
Let me try a less rhetorical approach: suppose we rename these things? (We can leave code in place to achieve backward compatibility if necessary).
How about:
BOOST_DATE_TIME_AUTOLINK_OFF and for the global: BOOST_ALL_AUTOLINK_OFF
I would prefer BOOST_DATE_TIME_NO_AUTOLINK and for the global: BOOST_NO_AUTOLINK or BOOST_DATE_TIME_DISABLE_AUTOLINK and for the global: BOOST_DISABLE_AUTOLINK -- Dave Abrahams BoostPro Computing http://www.boostpro.com
participants (5)
-
Beman Dawes
-
Dave Abrahams
-
gpolo1@tampabay.rr.com
-
Marshall Clow
-
Thomas Klimpel