$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Simmons, Aaron (a-simmons1_at_[hidden])
Date: 2004-09-03 10:42:42
Oh...  The error message is not exactly straight-forward.  I thought
something was broken.
 
Shouldn't the Boost.Threads documentation mention this?  Such as in the
FAQ?  It would've saved me quite a bit of time...
 
 
-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Ben Hutchings
Sent: Friday, September 03, 2004 9:48 AM
To: boost-users_at_[hidden]
Subject: RE: [Boost-users] statically linking to Boost.Threads with
msvc7
 
Aaron Simmons <a-simmons1_at_[hidden]> 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.