-----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Mateusz Loskot via Boost Sent: 24 February 2019 13:46 To: boost@lists.boost.org Cc: Mateusz Loskot Subject: Re: [boost] Building Boost 1.69 with Visual Studio 1.69
On Sun, 24 Feb 2019 at 10:20, Trueman, Chris
wrote: Thank you for taking the time to reply. Following your steps, b2 is still trying to use the VS2017 compiler that I have
installed. I can't seem to make it choose the VS2019 compiler.
I forgot completely about the project-config.jam modification. Here is more complete procedure
1. START > Visual Studio 2019 > x64 Native Tools Command Prompt 2. cd D:\boost.win 3. .\bootstrap.bat 4. Edit generated project-config.jam and replace
using msvc ; with using msvc : 14.1 : "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview\\VC\\Tools\\MSVC\\14.20.27323\\bin\\HostX64\\x64\\cl.exe" ;
5. Before you fire b2, you can remove -nologo from this line in D:\boost.win\tools\build\src\tools\msvc.jam
https://github.com/boostorg/build/blob/20d72776c8b61613f0e3b32d01b17f9ee013d...
6. Finally, run b2
.\b2 variant=debug address-model=64 --with-filesystem --with-test --layout=system
... compile-c-c++ bin.v2\libs\filesystem\build\msvc-14.1\debug\address-model-64\link-static\threading- multi\codecvt_error_category.obj Microsoft (R) C/C++ Optimizing Compiler Version 19.20.27323 for x64 Copyright (C) Microsoft Corporation. All rights reserved.
cl "libs\filesystem\src\codecvt_error_category.cpp" -Fo"bin.v2\libs\filesystem\build\msvc-14.1\debug\address-model-64\link-static\threading-multi\codecvt_error_category.obj" -TP /Z7 /Od /Ob0 /W3 /GR /MDd /Zc:forScope /Zc:wchar_t /favor:blend /wd4675 /EHs -c -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 "-I."
and you should see the CL 19.20.27323 from VS2019 is actually used, that is:
D:\boost.win>cl /? | findstr optimized Microsoft (R) C/C++ Optimizing Compiler Version 19.20.27323 for x64 Copyright (C) Microsoft Corporation. All rights reserved.
This looks fine, except that what I really expect and want to be able to do is use BOTH 14.1 and 14.2 in one call of bjam/b2 b2 address-model=64 toolset=msvc-14.1,msvc-14.2 ... So I put this in my user-config.jam using msvc : # Version VS 2017 14.1 : # compiler location (Note that the file layout completely changed recently) "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe" # 15.7.1 15May2018 for : # Options <define>BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE # Needed if you are working on develop or master ahead of the latest release. ; and the debug-config info said: # notice: will use 'C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe' for msvc, condition <toolset>msvc-14.1 # Used, for example, thus # b2 toolset=msvc-14.1 using msvc : # Version VS 2019 preview 14.2 : # compiler location (Note that the file layout completely changed recently) "C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/cl.exe" : # Options <define>BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE # Needed if you are working on develop or master ahead of the latest release. ; and the debug-config info said: # notice: will use 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/cl.exe' for msvc, condition <toolset>msvc-14.2 and I then used it like this for a hello_wordly example: b2 -a address-model=64 toolset=14.1 -d2 --debug-configuration > logfile.log The msvc.read-setup stage was this msvc.read-setup