|
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
directly.
> 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
and
bjam --v2 --debug-generators hello
for more insight into the problem.
- Reece
_________________________________________________________________
Be one of the first to try Windows Live Mail.
http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d
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