id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6644,"Windows: auto_link.hpp incorrectly errors with ""Mixing a dll boost library with a static runtime is a really bad idea...""",noloader@…,Ralf W. Grosse-Kunstleve,"I'm building a DLL which uses *static* runtime linking. Static runtime linking uses the /MT (and /MTd) switch. When Boost is compiled with under the DLL, the following error is reported: C:\Users\Public\boost-trunk\boost/config/auto_link.hpp(354) : fatal error C1189: #error : ""Mixing a dll boost library with a static runtime is a really bad idea..."" According to ""/MD, /MT, /LD (Use Run-Time Library)"", http://msdn.microsoft.com/en-US/library/2kzt1wy3(v=vs.90).aspx: /MT - Causes your application to use the multithread, static version of the run-time library. Defines _MT and causes the compiler to place the library name LIBCMT.lib into the .obj file so that the linker will use LIBCMT.lib to resolve external symbols. For completeness, here is the switch for dynamic runtime linking: /MD - Causes your application to use the multithread- and DLL-specific version of the run-time library. Defines _MT and _DLL and causes the compiler to place the library name MSVCRT.lib into the .obj file. ... Applications compiled with this option are statically linked to MSVCRT.lib. This library provides a layer of code that allows the linker to resolve external references. The actual working code is contained in MSVCR90.DLL, which must be available at run time to applications linked with MSVCRT.lib... To summarize, ""_MT"" is defined for both static and dynamic linking. ""_DLL"" is defined for just dynamic linking. And because I am building a DLL, ""_WINDLL"" is also defined. Perhaps the following would be better logic for auto_link.hpp (my apologies for not trying to figure out all the Boost defines): #if defined(BOOST_OS_WINDOWS) && defined(_MT) && !defined(_DLL) # define BOOST_OS_WINDOWS_STATIC 1 #elif defined(BOOST_OS_WINDOWS) && defined(_MT) && defined(_DLL) # define BOOST_OS_WINDOWS_DYNAMIC 1 #elif defined(BOOST_OS_WINDOWS) # pragma warning(""Neither static nor dynamic runtime linking has been picked up"") #endif ",Bugs,new,To Be Determined,python USE GITHUB,Boost 1.48.0,Problem,,Windows auto_link /MT /MD DLL,owasp-esapi-c++@…