Boost logo

Boost-Build :

Subject: Re: [Boost-build] Errors when compiling Boost on Windows with MinGW
From: Thomas Mang (thomasmang.ng_at_[hidden])
Date: 2012-03-02 04:58:48

On 01/03/2012 16:28, Lars Viklund wrote:

>>> Question: Do we need to specify the toolset explicilty when invoking
>>> bootstrap.bat or not
>> Well, when I didn't specify mingw to bootstrap.bat, it complained that
>> cl was not a recognised program. For some reason the check for compiler
>> wasn't detecting my MinGW, and was trying the VS compiler by default. A
>> simple fix, but
> The MinGW "autodetection" is limited to looking in a set of predefined
> locations and the path, as there's no registry keys or other ancillary
> methods of finding it.
> A good bet on Windows is to assume that if nothing else works, a flavor
> of MSVC might be in the path.

Could you please elaborate on autodetection and what version of b2 is
built depending on commands to bootstrap and/or autodetection working /
not working?

I have MinGW and MSVC on the same system; MinGW is in the PATH right at
the front, Msvc should be defined through system variables IIRC.
If I invoke "bootstrap.bat" a different version of b2 is build compared
to invoking "bootstrap.bat mingw"; if I invoke "bootstrap.bat msvc" I
get the cl-not-recognized-command error.
This all seems to be independent of what toolset is specified in
user-config.jam (i.e. does not seem to matter).

What I did for building binaries for MSVC and boost is as follows:
-) define _one_ toolset in user-config.jam
-) build b2 by following the steps in 5.3.1; specifically I had just
invoked "bootstrap.bat" and "b2 install" without specifying a toolset
-) build boost libraries using the built b2 and setting toolset
explicilty (including version).

That seemed to work in the sense it built binaries, but I haven't tested
those for MinGW yet (for MSVC haven't had any problems yet in the
programs). Was that correct or would I have needed to invoke
"bootstrap.bat mingw" to get a correct binary of b2 for building MinGW
libs? How would I need to explicitly specify msvc on calling
bootstrap.bat? At which stage do the definitions in user-config.jam
matter? Is it possible to have several lines in user-config.jam
uncommented (pointing to multiple toolsets) or is that something better
to be avoided?

many thanks !


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