Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-09-24 01:44:23


Hi Andre,

> I'm trying something along these lines:
>
> lib test_lib : : <name>test_lib <search>lib ;
> lib test_lib2 : : <name>test_lib2 <search>lib2 <use>test_lib ;
> exe main : main.cpp test_lib2 ;
>
> and it is not working. I know the <use> keywork works with normal
> libraries but it doesn't seem to work with searched libraries.

That's because the above says: "test_lib2" somehow uses "test_lib1", so should
be before test_lib1 on the command line. But that does not say that if you
use test_lib2, the test_lib should be also linked. So, only test_lib2 is
linked to 'main', and the library order does not matter: test_lib is just not
there.

You can work this around using:

lib test_lib : : <name>test_lib <search>lib ;
lib test_lib2 : : <name>test_lib2 <search>lib2 <use>test_lib
: : <source>test_lib ;

I'll think about this more. Basically, the <use> is the weakest form of
reference, it does not even set dependency from test_lib2 to test_lib. We
either need yet another mechanism or make <use> behave differently for
searched libraries.

Thanks,
Volodya

 


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