Build boost with msvc 14.1 ( VS2017 RC)

前端 未结 4 1984
广开言路
广开言路 2020-12-04 12:11

I am trying to build boost 1.63 with the lastest msvc 14.1 and VS2017 RC. So I did everything I do normally, I opened the Development Cmd and then I run the bootstrap.bat an

4条回答
  •  鱼传尺愫
    2020-12-04 13:07

    Boost 1.63 doesn't fully support VS2017, but you can trick it to find VC++2017 compiler:

    1. Run bootstrap.bat in boost directory
    2. Update the project-config.jam to include: using msvc : 14.0 : . Should be something like "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.24911\bin\HostX64\x64\cl.exe"
    3. Run "Developer Command Prompt for VS 2017 RC" from Windows Start Menu to boostrap from a shell configured using the x86 vcvars or x64 vcvars.
    4. Run b2 toolset=msvc-14.0 in that command prompt. For the x64 build, add address-model=64 to the b2 command line.

    UPDATE: Boost 1.64 should support VS2017

    Run "x86 Native Tools Command Prompt for VS 2017" or "x64 Native Tools Command Prompt for VS 2017" from Start Menu, than inside command prompt run b2:

    32-bit: b2 toolset=msvc-14.1 --build-dir=.x86 --stagedir=stage_x86

    64-bit: b2 toolset=msvc-14.1 address-model=64 --build-dir=.x64 --stagedir=stage_x64

    Add link=shared to build shared libraries

提交回复
热议问题