id summary reporter owner description type status milestone component version severity resolution keywords cc 13286 warning C4141: 'dllexport': used more than once tsondergaard@… Robert Ramey "The following warnings are emitted by Visual Studio 2017 when using boost/serialization as a shared library (and defining BOOST_ALL_DYN_LINK when using the library): {{{ C:\...\boost\include\boost-1_65_1\boost/archive/codecvt_null.hpp(68): warning C4141: 'dllexport': used more than once C:\...\boost\include\boost-1_65_1\boost/archive/codecvt_null.hpp(78): warning C4141: 'dllexport': used more than once C:\...\boost\include\boost-1_65_1\boost/serialization/singleton.hpp(94): warning C4141: 'dllexport': used more than once }}} The problem is use of BOOST_*_DECL and BOOST_DLLEXPORT at the same time. Removing the BOOST_DLLEXPORT macro from those lines as done in the following patch fixes the problem. {{{ diff --git a/boost/include/boost-1_65_1/boost/archive/codecvt_null.hpp b/boost/include/boost-1_65_1/boost/archive/codecvt_null.hpp index 7bce2b9b..332ae9f9 100644 --- a/boost/include/boost-1_65_1/boost/archive/codecvt_null.hpp +++ b/boost/include/boost-1_65_1/boost/archive/codecvt_null.hpp @@ -65,7 +65,7 @@ public: template<> class BOOST_SYMBOL_VISIBLE codecvt_null : public std::codecvt { - virtual BOOST_WARCHIVE_DECL BOOST_DLLEXPORT std::codecvt_base::result + virtual BOOST_WARCHIVE_DECL std::codecvt_base::result do_out( std::mbstate_t & state, const wchar_t * first1, @@ -75,7 +75,7 @@ class BOOST_SYMBOL_VISIBLE codecvt_null : public std::codecvt