|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-07-29 04:53:54
Hi Christopher,
> My problem occurs when I try and put 'utils' in another
> directory:
>
> # utils/Jamfile.v2
> project utils : usage-requirements <include>. ;
> lib utils : utils.cpp : : : <library>/boost/filesystem//fs ;
>
>
> # app/Jamfile.v2
> lib core : core.cpp : : : <library>/utils//utils ;
> exe app : app.cpp core ;
>
> # ./Jamfile.v2
> use-project /utils : utils ;
>
> Assume that 'core' needs to include some "utils.hpp" in order to build
> properly. This code will only add the <include> usage requirement to the
> exe, not to the lib.
>
> I could get around the problem by putting the <library> in the
> requirements field instead of the usage requirements, but that results
> in 'utils' being linked into 'core', which I imagine might result in
> duplicate symbols if static libraries are built.
That would really be funny with static linking, since you can't link once
static library into another one. But I think your problem has an easy
solution:
lib core : core.cpp : <dependency>/utils//utils : : <library>/utils//utils
;
The <dependency> feature cause usage-requirements to be propagated to from
utils to "core", but nothing else (like attempt at linking) is done. Too bad
the feature is not documented.
- 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