|
Boost-Build : |
From: Motonari Ito (motonari_at_[hidden])
Date: 2006-03-25 15:49:58
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