|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2003-11-05 11:44:00
At 08:07 AM 11/4/2003, John Maddock wrote:
>I've put together a set of draft guidelines come tutorial for libraries
>that have separate source code ...
This is a very nice piece of work! Thank you very much! It should help make
Boost libraries easier and more reliable to use.
Comments:
* There are several sections:
* Supporting Windows DLL's
* Importing/exporting dependencies
* Fixing the ABI of the Compiled Library
* Enabling Automatic Library Selection and Linking
IIUC, "Fixing the ABI of the Compiled Library" applies to more libraries
than just those compiled separately. Thus it might be better as the first
section, where header-only library developers can access it easily.
I also think a name like "Preventing ABI Clashes" would be more to the
point.
* Change:
required in order for that source to be compiled as a shared library.
to:
required for the source to be compiled as a shared library because
all external symbols are exposed.
* Change:
// asked for it by defining BOOST_ALL_DYN_LINK ...
to:
// asked for it by defining either BOOST_ALL_DYN_LINK ...
* Change:
// and not using it (possibly importing code):
to:
// rather than using it (possibly importing code):
* In:
>Why static linking by default? In the worked example above, the code
>assumes that the library will be statically linked unless the user asks
>otherwise. Most users seem to prefer this (there are no separate dll's
to
>distribute, and the overall distribution size is often significantly
>smaller
>this way as well: i.e. you pay for what you use and no more), but this is
a
>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.
* Change:
against the same C runtime as that that the program ...
to:
against the same C runtime as the program ...
That's all. Is there any reason I shouldn't go ahead and make the suggested
changes to the filesystem library?
Thanks,
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk