Boost logo

Boost :

From: John Maddock (boost.regex_at_[hidden])
Date: 2003-09-01 05:13:04


> I haven't followed this thread completely, but I have a question.
> I'm working on Win 2k, and I'm using VC++ 7.1. Building
> boost with this toolset, do I need to specify something to make it
> thread-safe?

Actually you need to do more than that - you need to compile Boost against
the same runtime library options that you use to build your application -
otherwise you will get linker errors at the very least. Relevant options
are:

<threading>multi : multithreaded builds
<threading>single> : single threaded builds
<runtime-link>dynamic : dynamic runtime
<runtime-link>static : static runtime.

The default behaviour is to build against the dynamic (and thread safe)
runtime, so if that's what you are using then you're OK, if you want the
static runtime library versions as well then:

bjam -sTOOLS=vc7.1 -sBUILD="debug release <threading>multi/single
<runtime-link>static"

will do the job.

Oh, and to answer your question: Boost is always as thread safe as the
runtime it's built against.

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk