diff --git a/doc/configuring_boost.qbk b/doc/configuring_boost.qbk index 0c4b8d82..ee86a9a3 100644 --- a/doc/configuring_boost.qbk +++ b/doc/configuring_boost.qbk @@ -271,6 +271,12 @@ feature off. Causes the auto-linking code to output diagnostic messages indicating the name of the library that is selected for linking. ]] +[[`BOOST_LIB_BUILDID`][ +If you built Boost using the `--buildid` option then set this macro to the same value +as you passed to bjam. For example if you built using `bjam address-model=64 --buildid=amd64` +then compile your code with `-DBOOST_LIB_BUILDID=amd64` to ensure the correct libraries +are selected at link time. +]] [[`BOOST_LIB_TOOLSET`][ Overrides the name of the toolset part of the name of library being linked to; note if defined this must be defined to a quoted string literal, for diff --git a/doc/html/index.html b/doc/html/index.html index 464e7696..4f252b54 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -680,6 +680,22 @@ + +

+ BOOST_LIB_BUILDID +

+ + +

+ If you built Boost using the --buildid option then set this + macro to the same value as you passed to bjam. For example if you + built using bjam address-model=64 --buildid=amd64 then compile your code + with -DBOOST_LIB_BUILDID=amd64 + to ensure the correct libraries are selected at link time. +

+ + +

BOOST_LIB_TOOLSET @@ -968,7 +984,7 @@ - +

Last revised: August 25, 2014 at 17:53:11 GMT

Last revised: October 02, 2014 at 17:20:14 GMT


diff --git a/include/boost/config/auto_link.hpp b/include/boost/config/auto_link.hpp index ae3ba1bd..56a16b0b 100644 --- a/include/boost/config/auto_link.hpp +++ b/include/boost/config/auto_link.hpp @@ -387,6 +387,11 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. # ifdef BOOST_LIB_DIAGNOSTIC # pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") # endif +#elif defined(BOOST_LIB_BUILDID) +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# endif #else # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") # ifdef BOOST_LIB_DIAGNOSTIC diff --git a/include/boost/config/user.hpp b/include/boost/config/user.hpp index d226a2d1..28e7476a 100644 --- a/include/boost/config/user.hpp +++ b/include/boost/config/user.hpp @@ -119,5 +119,15 @@ // that feature off. // #define BOOST_WHATEVER_NO_LIB - +// BOOST_LIB_BUILDID: Set to the same value as the value passed to Boost.Build's +// --buildid command line option. For example if you built using: +// +// bjam address-model=64 --buildid=amd64 +// +// then compile your code with: +// +// -DBOOST_LIB_BUILDID = amd64 +// +// to ensure the correct libraries are selected at link time. +// #define BOOST_LIB_BUILDID amd64 diff --git a/test/link/test/Jamfile.v2 b/test/link/test/Jamfile.v2 index 22668af2..251e5256 100644 --- a/test/link/test/Jamfile.v2 +++ b/test/link/test/Jamfile.v2 @@ -73,10 +73,10 @@ autolink-lib link_test : ../link_test.cpp explicit link_test ; run ../main.cpp link_test - : : : msvc-8.0:no msvc-9.0:no msvc-10.0:no static static single debug : link_test_ssd ; + : : : msvc-8.0:no msvc-9.0:no msvc-10.0:no msvc-11.0:no msvc-12.0:no static static single debug : link_test_ssd ; run ../main.cpp link_test - : : : msvc-8.0:no msvc-9.0:no msvc-10.0:no static static single release : link_test_ssr ; + : : : msvc-8.0:no msvc-9.0:no msvc-10.0:no msvc-11.0:no msvc-12.0:no static static single release : link_test_ssr ; run ../main.cpp link_test : : : static static multi debug : link_test_smd ;