Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-02-04 04:37:22


Hi Olaf,

> I'm trying to link against a framework which has been built with BBv2.
> I experimented with lib targets like
>
> lib Calcob :
> : <name>Calcob <search>../TBLib/Library/CalcObject/msvc-6/debug
>
> <toolset>msvc <variant>debug ;
>
> but this is a rather clumsy solution because I have to write an entry
> for every library and every build variant.

Well, Boost.Build has no idea what are library names and what a built
variants. You can save some typing with

for local lib in Calcon another yet_another
{
for local variant in debug release
{
lib $(lib) : ......... : .... <variant>$(variant) ;
}
}

> Nor does it work when
> specifying libs for different compiler versions:
>
> lib Calcob :
> : <name>Calcob <search>../TBLib/Library/CalcObject/msvc-6/debug
>
> <toolset>msvc <toolset-msvc:version>6 <variant>debug ;
>
> lib Calcob :
> : <name>Calcob <search>../TBLib/Library/CalcObject/msvc-7.1/debug
>
> <toolset>msvc <toolset-msvc:version>7.1 <variant>debug ;
>
> yields the error "failed to build ./Calcob with properties ... because
> no best-matching alternative could be found".

How do you initialize "msvc"? If you ever wrote

using msvc ;

(without version), then V2 does not not know what version msvc is and can't
decide what alternative to use. You should declare msvc only with specific
version for selection to work.

More details can be found in

http://article.gmane.org/gmane.comp.lib.boost.build/4074

and the following thread.

> I think I'm looking for an easy way to let BBv2 search libraries based
> on the requested build variant. How can this be done?

For now, it's required to declare all the variants. Do you have better
suggestions?

- 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