Subject: Re: [boost] [build] Building library with vc++ 64-bit does not find vcvarsall.bat
From: Edward Diener (eldiener_at_[hidden])
Date: 2017-10-13 20:45:05
On 10/13/2017 4:34 PM, James E. King, III via Boost wrote:
> On Fri, Oct 13, 2017 at 4:11 PM, Edward Diener via Boost <
> boost_at_[hidden]> wrote:
>> If I build any library with any version vc++ 64-bit compiler, by using
>> address-model=64, the vcvarsall.bat is looked for at, for example with
>> msvc-14.0, C:/Program Files (x86)/Microsoft Visual Studio
>> 14.0/VC/bin/vcvarsall.bat and is not found. Naturally this leads to basic
>> compilation failures. The path for vcvarsall.bat for msvc-14.0 is
>> C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat
>> instead. All versions of vc++ follow this path structure for vcvarsall.bat
>> Building with any version of vc++ 32-bit, by not specifying the
>> address-model, works correctly.
> I do not see this behavior on my system, using a stock cmd.exe (not running
> from a Visual Studio command line prompt) using the command:
> c:\boost\libs\format\test>rmdir /s /q c:\boost\bin.v2\libs
> c:\boost\libs\format\test>..\..\..\b2 toolset=msvc-14.0
> address-model=32,64 variant=debug,release -q -j5
Please try with just address-model=64. Why b2 tries to invoke
vcvarsall.bat from the wrong directory when I specify address-model=64
is the problem.
The default is 32-bits if no address model is specified. Whether or not
that should be so is another side issue.
> The resulting test binaries were correctly 32-bit and 64-bit.
> If I do not specify address-model on the command line, I get a 32-bit
> I find it quite odd that 32-bit would be the default here.
> In the summary output after launching b2 when building, 64-bit is not
> displayed as a line item either, only 32-bit is. But on linux 32-bit and
> 64-bit line items are shown in the summary.
> If I do the same build with msvc-14.1 as the toolset, the default output is
> also 32-bit.
> It looks like there is some technical debt that needs to be addressed
> Shouldn't default builds on Visual Studio 2015, 2017 be 64-bit if not
> - Jim
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk