From f7ab97e8625ad9f9d682c3af68b89ab49f404dea Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 10 Jan 2004 12:10:00 +0000 Subject: [PATCH] Added docs for auto-link and dll option macros [SVN r21572] --- config.htm | 60 +++++++++++++++++++++++++++++++++-- include/boost/config/user.hpp | 55 ++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+), 3 deletions(-) diff --git a/config.htm b/config.htm index 8939d351..643d1a9c 100644 --- a/config.htm +++ b/config.htm @@ -233,6 +233,60 @@ export LIBS="-lpthread" A suffix header to include in place of whatever boost.config would normally select, any replacement should undo the effects of the prefix header. + + BOOST_ALL_DYN_LINK + +

Forces all libraries that have separate source, to be linked as dll's rather + than static libraries on Microsoft Windows (this macro is used to turn on + __declspec(dllimport) modifiers, so that the compiler knows which symbols to + look for in a dll rather than in a static library).  +

+

Note that there may be some libraries that can only be statically linked + (Boost.Test for example) and others which may only be dynamically linked + (Boost.Threads for example), in these cases this macro has no effect.

+ + + + BOOST_WHATEVER_DYN_LINK + +

Forces library "whatever" to be linked as a dll rather than a static library on + Microsoft Windows: replace the WHATEVER part of the macro name with the name of + the library that you want to dynamically link to, for example use + BOOST_DATE_TIME_DYN_LINK or BOOST_REGEX_DYN_LINK etc (this macro is used + to turn on __declspec(dllimport) modifiers, so that the compiler knows which + symbols to look for in a dll rather than in a static library).  +

+

Note that there may be some libraries that can only be statically linked + (Boost.Test for example) and others which may only be dynamically linked + (Boost.Threads for example), in these cases this macro is unsupported.

+ + + + BOOST_ALL_NO_LIB + +

Tells the config system not to automatically select which libraries to link + against.  +

+

Normally if a compiler supports #pragma lib, then the correct library build + variant will be automatically selected and linked against, simply by the act of + including one of that library's headers.  This macro turns that feature + off.

+ + + + BOOST_WHATEVER_NO_LIB + +

Tells the config system not to automatically select which library to link + against for library "whatever", replace WHATEVER in the macro name with the + name of the library; for example BOOST_DATE_TIME_NO_LIB or + BOOST_REGEX_NO_LIB.  +

+

Normally if a compiler supports #pragma lib, then the correct library build + variant will be automatically selected and linked against, simply by the act of + including one of that library's headers.  This macro turns that feature + off.

+ +

Advanced configuration usage

By setting various macros on the compiler command line or by editing <boost/config/user.hpp>, @@ -389,9 +443,9 @@ export LIBS="-lpthread" Compiler Argument dependent lookup fails if there is a using declaration for the symbol being looked up in the current scope.  For - example, using boost::get_pointer; prevents ADL from finding overloads of - get_pointer in namespaces nested inside boost (but not elsewhere).  - Probably Borland specific. + example, using boost::get_pointer; prevents ADL from finding + overloads of get_pointer in namespaces nested inside boost (but + not elsewhere).  Probably Borland specific. BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP diff --git a/include/boost/config/user.hpp b/include/boost/config/user.hpp index f851e92c..5a4a9d47 100644 --- a/include/boost/config/user.hpp +++ b/include/boost/config/user.hpp @@ -65,5 +65,60 @@ // even when available: // #define BOOST_DISABLE_WIN32 +// BOOST_DISABLE_ABI_HEADERS: Stops boost headers from including any +// prefix/suffix headers that normally control things like struct +// packing and alignment. +// #define BOOST_DISABLE_ABI_HEADERS + +// BOOST_ABI_PREFIX: A prefix header to include in place of whatever +// boost.config would normally select, any replacement should set up +// struct packing and alignment options as required. +// #define BOOST_ABI_PREFIX my-header-name + +// BOOST_ABI_SUFFIX: A suffix header to include in place of whatever +// boost.config would normally select, any replacement should undo +// the effects of the prefix header. +// #define BOOST_ABI_SUFFIX my-header-name + +// BOOST_ALL_DYN_LINK: Forces all libraries that have separate source, +// to be linked as dll's rather than static libraries on Microsoft Windows +// (this macro is used to turn on __declspec(dllimport) modifiers, so that +// the compiler knows which symbols to look for in a dll rather than in a +// static library). Note that there may be some libraries that can only +// be statically linked (Boost.Test for example) and others which may only +// be dynamically linked (Boost.Threads for example), in these cases this +// macro has no effect. +// #define BOOST_ALL_DYN_LINK + +// BOOST_WHATEVER_DYN_LINK: Forces library "whatever" to be linked as a dll +// rather than a static library on Microsoft Windows: replace the WHATEVER +// part of the macro name with the name of the library that you want to +// dynamically link to, for example use BOOST_DATE_TIME_DYN_LINK or +// BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport) +// modifiers, so that the compiler knows which symbols to look for in a dll +// rather than in a static library). +// Note that there may be some libraries that can only be statically linked +// (Boost.Test for example) and others which may only be dynamically linked +// (Boost.Threads for example), in these cases this macro is unsupported. +// #define BOOST_WHATEVER_DYN_LINK + +// BOOST_ALL_NO_LIB: Tells the config system not to automatically select +// which libraries to link against. +// Normally if a compiler supports #pragma lib, then the correct library +// build variant will be automatically selected and linked against, +// simply by the act of including one of that library's headers. +// This macro turns that feature off. +// #define BOOST_ALL_NO_LIB + +// BOOST_WHATEVER_NO_LIB: Tells the config system not to automatically +// select which library to link against for library "whatever", +// replace WHATEVER in the macro name with the name of the library; +// for example BOOST_DATE_TIME_NO_LIB or BOOST_REGEX_NO_LIB. +// Normally if a compiler supports #pragma lib, then the correct library +// build variant will be automatically selected and linked against, simply +// by the act of including one of that library's headers. This macro turns +// that feature off. +// #define BOOST_WHATEVER_NO_LIB +