Aaron Simmons <a-simmons1@ti.com> wrote:

I’ve built and installed boost on a WinXp system with VS.Net 2003.  I’m trying to use it in a static CRT project.  I get the following error whenever I compile:

>      error C1189: #error :  "Mixing a dll boost library with a static runtime is a really bad idea..."

I noticed that this is happening because BOOST_DYN_LINK is #defined in config.hpp.  Apparently dynamic linking is the default for Boost? 

Windows does not support registration of clean-up functions for thread-specific storage (TSS, or TLS), but it does notify DLLs when a thread exits and this gives DLLs a chance to clean-up their thread-specific storage. So in order to make TSS work correctly, Boost.Threads is designed to be built only as a DLL on Windows. This means, as the error message says, that you need to use the DLL version of the CRT.

Ben.