Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-10-08 10:08:43

brock_peabody wrote:

> That worked! Unfortunately, I've still got one problem left. It
> seems to be confused about how to build Boost.Thread. It skips it
> with the warning:
> warning: skipped build of /c:/boost/libs/thread/build/boost_thread
> with
> properties <debug-store>object <debug-symbols>off <exception-
> handling>on
> <hardcode-dll-paths>false <inlining>full <link-runtime>shared
> <link>shared
> <optimization>speed <os>NT <profiling>off <rtti>on <runtime-
> debugging>off
> <stdlib>native <symlink-location>project-relative <threading>single
> <toolset>msvc <user-interface>console <variant>release because no
> best-matching alternative could be found
> If I put any code using thread into "a.cpp" it fails to link.
> Any ideas?

Yes, you're building your project with default "<threading>single".
Boost.Build refuses to build Boost.Thread in that case. Note that even if it
worked, it's likely to crash at runtime, since when compiling with
<threading>single other code might not be thread-safe.

The solution is to either

- add "threading=multi" to bjam command line
- add "<threading>multi" to the requrements of your proejct
(if it really required threading support)

: requirements <threading>multi

- add "<threading>multi" to default build of your project

: default-build <threading>multi

Well, the second variant might not work at the moment: a certain fix will
appear in the next milestone which will be released really soon. It was
comitted some time ago, but I'm not sure if it's available in anynoumous CVS.

- Volodya


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at