Boost logo

Boost-Build :

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2004-08-24 02:41:15


Vladimir Prus wrote:

> I presume '../../../modules/utilities/test' is NOT the same project where you
> add $(LIBS) to requirements? Because the following works for me:
>
> lib a ;
>
> project
> : requirements <library>a
> ;
>
> exe hello : hello.cpp ;

indeed $(LIBS) is added to the requirements in the top-Jamfile while the
problem arises 3 levels lower in my source-tree.

>
> I think the problem is that when you have a child project the <library>a is
> inherited without change, but the child project does not have any target
> named 'a'.
>
> I'd suggest to workaround this using:
>
> lib a ;
>
> project foobar
> : requirements <library>/foobar//a
> ;
>
> To make sure child can always access the library.

And this works brilliantly, yippiee !!!! But I now stumble on another
problem: the order of the libraries. I do

project foobar
: requirements
<library>/foobar//a
<library>/foobar//c
<library>/foobar//b
;

and they appear on the link-line in sorted order ;-( I tried to use the
'&&' syntax (as discussed in another thread) but it does not work for
<library>. So I went back to using <find-shared-library> where the '&&'
syntax does work but apparenatly the search-path that was set on the
library is not added to the link-line '-(

BTW, when should <library> be used and when should <find-shared-library>
be used ?

(I hope that once this is solved my project will compile fine and stop
annoying you with my waterfall of questions ;0)

toon

 


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