Boost logo

Boost-Build :

Subject: Re: [Boost-build] b2 - what does this message mean? "error: No best alternative for"
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2019-04-03 16:51:34


AMDG

On 4/3/19 10:43 AM, Paul A. Bristow wrote:
>
>
>> -----Original Message-----
>> From: Steven Watanabe [mailto:watanabesj_at_[hidden]]
>> Sent: 02 April 2019 15:12
>> <snip>
>>
>> run hello_boost_chrono_library.cpp
>> : name hello_boost_chrono_library_prebuilt

This should say `target-name` instead of `name`

>> ;
>
>
>
> I'm sure this is the cause, but despite some fumbling experiments, I could not find an incantation that works.
>
> 4.5 testing
>
> test rule. The run rule has the following signature:
>
> rule run ( sources + : args * : input-files * : requirements * : target-name ? : default-build * )
>
> which is different from the 'common rule format' used by other examples
>
> lib filesystem : : <name>libfilesystem
>
> So I expected it to be this
>
> # To build both ways in same jamfile here, must name explicitly different
> # or target name would be ambiguous with default implicit name of source file.
>
> run
> hello_boost_chrono_library.cpp # Source(s)
> : # Args *
> : # Input files *
> : # Requirements *
> : # Target name
> <name>hello_boost_chrono_library_pre-built # Explicit run target name.

Leave off the <name> and it should work.

> ; # Use pre-built library.
>
> But I'm obviously still too stupid to understand bjam ☹
>
> Suggestions welcome.
>

In Christ,
Steven Watanabe


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