Building Boost 1.70 with VS2019?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Building Boost 1.70 with VS2019?

Boost - Users mailing list
Hi, everyone.

How can I have Boost.Build use VS2019 when building Boost?  I have a side-by-side installation of VS2019 on my computer, along with VS2017 also still being there.  

If this hasn't been tested yet, I'll wait until it has.  

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Building Boost 1.70 with VS2019?

Boost - Users mailing list
On Tue, 16 Apr 2019 at 21:37, Osman Zakir via Boost-users
<[hidden email]> wrote:
>
> How can I have Boost.Build use VS2019 when building Boost?
> I have a side-by-side installation of VS2019 on my computer, along with VS2017 also still being there.

1. START > Command Prompt (yes, the regular Windows Command Prompt)

2. cd C:\where\is\your\boost-1.70

3. bootstrap.bat

4. Run

b2 toolset=msvc-14.2 --debug-configuration

notice: found boost-build.jam at D:/boost.win/boost-build.jam
notice: loading Boost.Build from D:/boost.win/tools/build/src
notice: Searching 'C:\WINDOWS' 'C:\Users\mateuszl' 'C:\Users\mateuszl'
'C:\Users\mateuszl' 'D:\boost.win\tools/build/src'
'D:/boost.win/tools/build/src/kernel'
'D:/boost.win/tools/build/src/util'
'D:/boost.win/tools/build/src/build'
'D:/boost.win/tools/build/src/tools'
'D:/boost.win/tools/build/src/contrib'
'D:/boost.win/tools/build/src/.' for site-config configuration file
'site-config.jam'.
notice: Configuration file 'site-config.jam' not found in 'C:\WINDOWS'
'C:\Users\mateuszl' 'C:\Users\mateuszl' 'C:\Users\mateuszl'
'D:\boost.win\tools/build/src' 'D:/boost.win/tools/build/src/kernel'
'D:/boost.win/tools/build/src/util'
'D:/boost.win/tools/build/src/build'
'D:/boost.win/tools/build/src/tools'
'D:/boost.win/tools/build/src/contrib'
'D:/boost.win/tools/build/src/.'.
notice: Searching 'C:\Users\mateuszl' 'C:\Users\mateuszl'
'C:\Users\mateuszl' 'D:\boost.win\tools/build/src'
'D:/boost.win/tools/build/src/kernel'
'D:/boost.win/tools/build/src/util'
'D:/boost.win/tools/build/src/build'
'D:/boost.win/tools/build/src/tools'
'D:/boost.win/tools/build/src/contrib'
'D:/boost.win/tools/build/src/.' for user-config configuration file
'user-config.jam'.
notice: Configuration file 'user-config.jam' not found in
'C:\Users\mateuszl' 'C:\Users\mateuszl' 'C:\Users\mateuszl'
'D:\boost.win\tools/build/src' 'D:/boost.win/tools/build/src/kernel'
'D:/boost.win/tools/build/src/util'
'D:/boost.win/tools/build/src/build'
'D:/boost.win/tools/build/src/tools'
'D:/boost.win/tools/build/src/contrib'
'D:/boost.win/tools/build/src/.'.
notice: Searching '.' for project-config configuration file
'project-config.jam'.
notice: Loading project-config configuration file 'project-config.jam' from '.'.
notice: [msvc-cfg] msvc-11.0 detected, command: 'C:\Program Files
(x86)\Microsoft Visual Studio 11.0\VC\bin\cl.exe'
notice: [msvc-cfg] msvc-10.0 detected, command: 'C:\Program Files
(x86)\Microsoft Visual Studio 10.0\VC\bin\cl.exe'
notice: [msvc-cfg] msvc-14.2 detected, command: 'C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Professional\VC\Tools\MSVC\14.20.27508\bin\Hostx64\x64\cl.exe'
notice: [msvc-cfg] msvc-14.1 detected, command: 'C:\Program Files
(x86)\Microsoft Visual
Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\cl.exe'
notice: will use 'C:\Program Files (x86)\Microsoft Visual
Studio\2019\Professional\VC\Tools\MSVC\14.20.27508\bin\Hostx64\x64\cl.exe'
for msvc, condition <toolset>msvc-14.2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

5 .Verify if VS 2019 is reported in the configuration diagnostics like
underlined above

If you want to build with VS2017, instead of toolset=msvc-14.2, use
toolset=msvc-14.21

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Building Boost 1.70 with VS2019?

Boost - Users mailing list
On Tue, 16 Apr 2019 at 22:41, Mateusz Loskot <[hidden email]> wrote:
>
> If you want to build with VS2017, instead of toolset=msvc-14.2, use
> toolset=msvc-14.21

I meant, msvc-14.1, not 14.21, of course.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Building Boost 1.70 with VS2019?

Boost - Users mailing list
Thanks for the reply.  

So I leave the configuration file as it is and just say when running b2 that I want MSVC version 14.2?

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Building Boost 1.70 with VS2019?

Boost - Users mailing list
Osman Zakir via Boost-users wrote:
> Thanks for the reply.
>
> So I leave the configuration file as it is and just say when running
> b2 that I want MSVC version 14.2?

I've just built for v142 and v140. By just running b2, no options, the
latest compiler will be used. v142.
Then to build for v141 in your case:
.\b2 toolset=msvc-14.1

All the files will land in $(BOOST_ROOT)/stage/lib
And that is fine. The boost headers will link according the compiler you
choose for your projects.

Best, Dan.

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users