|
Boost : |
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2008-01-31 16:28:23
Stefan,
> > I'm not sure where the -lpthread needs to be added (I added it
> manually
> > to the link command and it succeeded), or in fact, why wave links to
> > boost_thread at all. It doesn't use threads underneath, or does it ?
>
> It turns out the dependency on boost_thread is dragged in by
> boost.spirit. (I modified the subject line to reflect this.)
>
> I'm not sure in what way boost_thread is used there, but I would hope
> that the decision to use threads (and boost_thread) could be left to
> the
> library's user. Only pay for what you really use, or so the saying
> goes...
>
> Is it possible to modify the config logic to have some users only use
> the subset of boost.spirit that doesn't require boost_thread ?
>
> (I'm writing a preprocessor and I do not want to use threads, so why
> would I have to link with boost_thread and pthread ?)
Wave drags in threads only if it gets compiled in an environment requiring
threads (BOOST_HAS_THREADS is defined). If you build Wave such that
BOOST_HAS_THREADS is not defined, it won't depend on threads.
HTH
Regards Hartmut
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk