Boost::dynamic_linking is needed under non-Windows OSes too
There are some cases where BOOST_ALL_DYN_LINK (Or a library specific one: e.g. BOOST_TEST_DYN_LINK) is required on non-Windows OSes.
There are at least 2 cases that I'm aware of:
-
Using "Shared library variant" of Boost.Test requires it under all platforms (otherwise no main() is generated):
-
Boost.Log needs it (but not documented):
Currently, Boost::dynamic_linking is noop under non-Windows platforms, but it can be used in these cases instead of manually defining the corresponding macros.
(BTW, while Boost.Test might be used without that definition in other usage variants, I'm not aware of any case where Boost.Log can be used without BOOST_LOG_DYN_LINK, so it might be automatically added when only the shared variant exists).