Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2006-07-17 18:20:03

Artem Alimarine wrote:

> My project has now a contruction like
> project hello
> : requirements
> <link>static
> <threading>multi
> ;
> lib hello_lib : hello_gcc.cpp : <toolset>gcc ;
> lib hello_lib : hello_msvc.cpp : <toolset>msvc ;

That looks fine.

> I get the following error under cygwin
> error: No best alternative for ./hello
> next alternative: required properties: <link>static <threading>multi
> <toolset>gcc
> not matched
> next alternative: required properties: <link>static <threading>multi
> <toolset>msvc
> not matched
> The compiler command does is bjam --v2 hello

Have you checked what toolset is first in your user-config.jam file? If that isn't gcc or msvc, the above isn't going to work. Also, have you tried:

   bjam --v2 msvc hello


> As far as I understand the build request has more targets than allowed
> by the project. For those targets, like
> a shared single-threaded gcc build, there is no most specific rule.

The hello_lib target is only specified for msvc and gcc toolsets. When requesting a build, the build system is trying to build hello_lib for another toolset, so it doesn't find a version of hello_lib that matches. The static and multithreaded options are pulled in from the requirements on the hello project and won't make a difference here.

> How do I say to the build system that the only interesting builds would
> be static multithreaded gcc and msvc. I understand that it could be
> specified in the command line, but that is not a nice solution to give
> the arguments all the time.

Your solution appears to be correct. If my suggestions don't work, try doing:

   bjam --v2 --debug-configuration hello


   bjam --v2 --debug-generators hello

for more insight into the problem.

- Reece
Be one of the first to try Windows Live Mail.

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at