|
Boost : |
From: John Maddock (john_at_[hidden])
Date: 2003-11-06 07:16:42
Thanks,
Comments snipped: will make the suggested changes.
> >subjective call, and some libraries may even only be available in dynamic
> >versions (Boost.threads for example). Suggestion: use
> >BOOST_WHATEVER_STATIC_LINK to force static linking of a library that is
> >dynamic by default, and use BOOST_WHATEVER_DYN_LINK to force dynamic
> >linking of a library that is static by default.
>
>I found the last sentence pretty opaque. Who is supposed to use
>BOOST_WHATEVER_STATIC_LINK and where? There are no other mentions of
>BOOST_WHATEVER_STATIC_LINK in either text or examples.
Sorry, I need to make that clearer - there are some libraries that need to
dynamic link by default - in those cases the usual BOOST_WHATEVER_DYN_LINK
is of no use (it's always on anyway in effect), in those cases if you want
to suppress the import/export mechanism we need a new macro to turn it off -
so BOOST_WHATEVER_STATIC_LINK is suggested.
> That's all. Is there any reason I shouldn't go ahead and make the
suggested
> changes to the filesystem library?
That would be a good test case.
One bug I noticed: In the section on auto-linking there needs to be a way
for the user to suppress this (for example if they add the source directly
to their project), BOOST_WHATEVER_NO_LIB is the form regex uses, and we
should have an _ALL_ version as well:
//
// Automatically link to the correct build variant where possible, and not
explicitly disabled.
//
# if !defined(BOOST_WHATEVER_SOURCE) && !defined(BOOST_WHATEVER_NO_LIB) &&
!defined(BOOST_ALL_NO_LIB)
//
// Set the name of our library, this will get undef'ed by auto_link.hpp
// once it's done with it:
//
#define BOOST_LIB_NAME boost_whatever
//
// If we're importing code from a dll, then tell auto_link.hpp about it:
//
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_WHATEVER_DYN_LINK)
# define BOOST_DYN_LINK
#endif
//
// And include the header that does the work:
//
#include <boost/config/auto_link.hpp>
#endif
Thanks for taking the time to plough thorough this!
John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk