|
Boost-Build : |
From: Tim St. Clair (timothysc_at_[hidden])
Date: 2008-07-24 10:50:41
FYI...
---------- Forwarded message ----------
From: Tim St. Clair <timothysc_at_[hidden]>
Date: Tue, Jul 22, 2008 at 5:27 PM
Subject: 1.35.0 && serialization && spirit && thread safety
To: boost-users_at_[hidden]
I've seen info in various email-threads regarding thread safety when using
xml archives.
We had come across some assert conditions in multithreaded code, only to
trace down that (BOOST_SPIRIT_THREADSAFE) was not defined during boost
compilation.
to fix, I modified the Jamfile.v2 for serialization:
lib boost_serialization
: $(SOURCES).cpp
/boost/thread//boost_thread # needed to
add this as a dep b/c we need to link threads when we define
BOOST_SPIRIT_THREADSAFE
: <define>BOOST_SPIRIT_THREADSAFE # needed to add this as a
define
<toolset>msvc:<cxxflags>/Gy
<link>shared:<define>BOOST_SERIALIZATION_DYN_LINK=1
<conditional>@include-spirit
;
I've also added BOOST_SPIRIT_THREADSAFE as a <define> in our code as well.
I hope this helps others...
Cheers,
Tim
-- Regards, Timothy St. Clair [timothysc_at_[hidden]]
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk