Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-06-09 07:42:24

Hi Konstantin,

> local rule locate ( version ? : vendor ? )
> {
> ..............
> if ! $(setup)
> {
> error toolset msvc $(vendor) $(version) initialization: :
> couldn't find compiler in $(possible-paths) ;
> }
> ..............
> }
> When I have tryed to run bjam under linux - there is no VC :) - I have
> got the error message. I am using import rule in project-root.jam to
> include support of msvc, gcc and borland. What am I doing wrong?

I think the idea is that "using msvc" and the like occurs in user-config.jam
and site-config.jam -- and that those files don't declare toolsets which are
not installed.

In your case --- where toolsets are declared in project-root.jam --- you can

if $(OS) in NT
using msvc ;
and I believe it's the best way. Imagine that somebody has already configured
gcc in his user-config.jam --- for example, giving unusual location. Now he
tries to compile your project and project-root.jam tries to reconfigure gcc
again. That's surely undesirable, and if it's not an error already, it should
be error.

However, there's a more general problem. People might write

lib a : a_gcc.cpp : <toolset>gcc ;
lib a : a_msvc.cpp : <toolset>msvc ;

and such a thing requires to initialize both "gcc" and "msvc" toolsets --- on
all platforms, because otherwise, <toolset>msvc won't be recognized as valid

No solution is devised yet. One might be to disable the error message. Other
is to allow to disable checks explicitly, when configuring msvc. Yet another
is to allow the user to say "<toolset>msvc is valid property", without
initialazing msvc.

I prefer the last approach -- since it's the simplest and will work regardless
of user-config content.

- Volodya


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