![]() |
Boost : |
From: Andrew Finkenstadt (pbrane_at_[hidden])
Date: 2006-05-04 00:49:11
The goal:
upgrade from boost 1.32 to 1.33.1.
The gotcha:
Somehow a programmer here managed to build a version of boost::thread
version 1.32 whose .LIB file did not contain any directives to link against
MSVCRT and MSVCPRT; there doesn't seem to be anything I do with bjam that
causes version 1.33.1 to do the same. (He just handed me the .lib files to
install into the right place, I knew I should have insisted he learn to do
it himself. :) )
"dumpbin /directives /archivemembers libboost_thread-vc71-mt-s-1_33_1.lib"
yields several
Linker Directives
-----------------
/DEFAULTLIB:"msvcprt"
/DEFAULTLIB:"MSVCRT"
commands. Which totally breaks my application (which requires the use of
LIBCMT) by complaining of duplicate symbols defined in both. /NODEFAULTLIB:
is not appropriate.
The frustration:
I can't seem to find where bjam's rules for specifying the CC Options *are*,
much less know how to twiddle the Jamfile.v2 file for boost::threads.
The steps I've taken:
I had a similar problem with the regex library, but the vc71.mak file built
perfect libraries. There's no corresponding vc71.mak file that I've found
yet, for threads. So, to build threads, I basically go to the top level of
boost_1_33_1 and run bjam with the vc71 toolset option.
The reward:
my eternal gratitude... and my sincerest thanks for help in answering this,
no doubt, simple question.
I've been reading the list for about a year, but don't remember seeing this
specific issue discussed. Last year in
http://lists.boost.org/boost-users/2005/05/11725.php was a discussion about
whether boost::thread in 1.32 supported static runtime linking , and the
answer appears to be yes, but like I said -- i have no idea how Junior
Programmer got it done and working.
Best regards,
andy
Boost 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