BUG: _DLL used to define BOOST_SIGNALS_STATIC_LINK
Under cl(MS)/icl(Intel) compiler hash-def '_DLL' denotes dynamic linking of the C runtime library. Therefore, signals library should not use this to determine linkage (I may wish to statically link the signals library, while dynamically linking c-runtime.) see file boost/signals/detail/signals_common.hpp where the following snippet is invalid: #if defined(_MSC_VER) && defined(_DLL) # define BOOST_SIGNALS_HAS_DLL_RUNTIME #endif #if defined(BOOST_SIGNALS_HAS_DLL_RUNTIME) && !defined (BOOST_SIGNALS_STATIC_LINK) # if defined(BOOST_SIGNALS_IN_LIBRARY_SOURCE) # define BOOST_SIGNALS_DECL __declspec(dllexport) # define BOOST_SIGNALS_BUILD_DLL # else # define BOOST_SIGNALS_DECL __declspec(dllimport) # endif #endif here BOOST_SIGNALS_DECL is defined as __declspec(dllimport) as a consequence of linking the c-runtime dynamically under cl/icl compilers. But that's not what I wanted - I wanted to link signals.lib statically. This same bug is in the regex library. In fact, anyone able to fix this, should search for _DLL in the BOOST headers. Cheers, Kai
This same bug is in the regex library. In fact, anyone able to fix this, should search for _DLL in the BOOST headers.
It's not a bug - the library has to decide which option to use by default, and both regex and signals let you switch to the other option by defining a macro. However, the regex lib in the next release will static link by default (more users seem to want this). John.
participants (2)
-
John Maddock
-
kaineumann2001