Boost logo

Boost :

Subject: Re: [boost] [build] msvc-14 linker step failing?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2018-02-04 19:45:43


AMDG

On 02/04/2018 12:23 PM, John Maddock via Boost wrote:
>
> On 04/02/2018 18:25, Steven Watanabe via Boost wrote:
>> On 02/04/2018 11:13 AM, John Maddock via Boost wrote:
>>> I have, and have had for some time:
>>>
>>> using msvc : 14.0 : "C:/Program Files (x86)/Microsoft Visual Studio
>>> 14.0/VC/bin/cl.exe" ;
>>>

  In theory, you shouldn't need to pass the compiler
path explicitly.

>>    Does it work if you add <rewrite-setup-scripts>off (as the next
>> argument after the compiler)?
>
> No, it calls vcvarsall.bat at expected, but the call to mt still fails.
>
> Strangely, if I open a VS command prompt from the start menu, then mt
> definitely is working.  Ah... I see, that calls "C:\Program Files
> (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat" which
> does set the paths correctly for the SDK tools, where as vcvarsall.bat
> only fixes up the compiler tools, not the SDK stuff it seems.
>

  They should both call the same code (which queries the registry).
However, for me, it looks like VsDevCmd.bat sets up a
32-bit environment, while you seem to be building for
64-bit.

vsvars64.bat:
@call "%VS140COMNTOOLS%VCVarsQueryRegistry.bat" No32bit 64bit %1 %2

VsDevCmd.bat:
@call "%VS140COMNTOOLS%VCVarsQueryRegistry.bat" 32bit No64bit

> BTW the setup script sets the path to include for example:
>
> C:\Program Files (x86)\Windows Kits\10\bin\x86
>
> But there's nothing in there.... mt.exe is located under (for example)
>
> C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x86
>

This should be x64 not x86.

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk