Boost logo

Boost-Build :

Subject: Re: [Boost-build] Different builds for XP and Vista/7
From: Juraj Ivanèiæ (juraj.ivancic_at_[hidden])
Date: 2011-04-13 05:41:04


On 13.4.2011 10:51, Artem Alimarine wrote:

> The problem is that the library is not built at all:
>
> feature.subfeature target-os windows : flavor : vista xp : composite
> optional ;
> feature.compose<target-os-windows:flavor>vista :
> <define>_WIN32_WINNT=0x0600 ;
> feature.compose<target-os-windows:flavor>xp :
> <define>_WIN32_WINNT=0x0501 ;
> lib foo_lib : foo_xp.cpp :<target-os>windows-xp ;
> lib foo_lib : foo_vista.cpp :<target-os>windows-vista ;
>
> Command line:
> bjam target-os=windows-xp -d2 foo_lib -a
>
> It reports:
> error: No best alternative for ./foo_lib
> next alternative: required properties:<link>static
> <runtime-link>static<target-os>windows-xp<threading>multi
> not matched
> next alternative: required properties:<link>static
> <runtime-link>static<target-os>windows-vista<threading>multi
> not matched
> ...found 1 target...
>
> It even does not create the bin directory.

Try changing foo_lib to this

lib foo_lib : foo_xp.cpp : <target-os-windows:flavor>xp ;
lib foo_lib : foo_vista.cpp : <target-os-windows:flavor>vista ;


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