Boost logo

Boost-Build :

From: King, Steven R (steven.r.king_at_[hidden])
Date: 2006-03-25 16:24:09


Thank you very much! I chose your option 1 to build boost libs as
needed -- works great.
Thanks for such a quick reply too.
-steve

-----Original Message-----
From: boost-build-bounces_at_[hidden]
[mailto:boost-build-bounces_at_[hidden]] On Behalf Of Motonari Ito
Sent: Saturday, March 25, 2006 12:50 PM
To: Boost.Build developer's and user's list
Subject: Re: [Boost-build] [bbv2] depending on boost libs ??

Hi,

>Would simply like to build an exe that depends on the external
>pre-built boost thread library.

I had the same problem, and found three solutions depends on the
requirements.

1. When you have a whole boost libraries with sources downloaded from
boost.org:

--------------
use-project /boost : C:/boost_1_33_1 ;
exe foo :
         foo.c
         /boost/thread//boost_thread
;
--------------

It compiles boost libraries "on demand" based on the current variant
(release/debug, static/shared, etc). It is very convenient, but maybe
does not fit in your case.

2. When you have a prebuilt boost thread library for the specifc build
variant. Assume you have:
C:\lib\libboost_thread-vc71-mt-s.lib

--------------
lib boost_thread : : <file>C:\lib\libboost_thread-vc71-mt-s.lib ; exe
foo :
         foo.c
         boost_thread
;
--------------

3. When you have prebuilt boost thread libraries for many build
variants, and want to select correct one for the current build variant.

I don't know the best solution, but I ended up with writing library
selection code by myself.

Assume you have boost libraries at C:/TOOLS/boost_1_33_0/stage/lib, I'm
attaching my solution.

Unfortunately, it works only for windows platform so far. It should not
be a big deal to extend it to other platform, though.

Thank you.


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