From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-11-09 01:48:26
On Monday 08 November 2004 17:16, jeffbenshetler wrote:
> > > 1. Is there any way to "abstract away" <lib>/<dll>? For example, to
> > > specify the Boost.Thread library as a dependency I had to add
> > > <dll>../../thread/build/boost_thread to the sources. On Windows, the
> > > static library variant doesn't exist so adding <lib>.. to the sources
> > > leads to an error. This is ok, but I need to know/specify more than
> > > absolutely necessary. It would be nice to just say that a target
> > > on the thread library and the build system then figures out by itself
> > > whether the static or the dynamic variant should be used (maybe
> > > a preference the user specifies on the command line).
> > There is in BBv2, but not really in BBv1. You can however do
> something like:
> How does one do this in BBv2? We're just getting started with BB, and
> like it, but we're struggling with library dependencies.
In V2, you'd write
exe foo : foo.cpp /boost/threads//boost_threads ;
You see, there's no <dll> or <lib> there. In fact, there Boost.Thread Jamfile
lib boost_threads : ...
which will build either DLL or LIB depending on the <link> property:
<link>shared builds DLL and <link>static builds LIB. I think current V2
Jamfile for Boost.Thread just requires <link>static, but it surely can be
limited to NT only, so that shared library be used on Unix.
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