安装boost库(VC)

vc14+

2026-02-18

Written by: tdtc

Current Version(xyz): 1.90.0

MSVC

名称 VS版本 Minimum version
msvc-14.0 VS2015 1.59.0
msvc-14.2 VS2019 1.71.0
msvc-14.3 VS2022 1.78.0

1. 编译(x86)

x86 Native Tools Command Prompt for VS xxxx

as of Boost 1.47.0, the official name of the executable was changed to b2.

Gen b2 and build

cd C:\boost_x_y_z
bootstrap.bat

vs2022.14

build

b2 stage --toolset=msvc-14.3 --without-graph --without-graph_parallel --without-math --without-mpi --without-python --without-serialization --without-wave --stagedir="C:\boost\bin\vc143" link=static runtime-link=shared runtime-link=static threading=multi debug release
b2 stage --toolset=msvc-14.2 
...
--stagedir="C:\boost\bin\vc142"
...

2. 使用

Copy the ‘C:\boost_x_y_z\boost’ folder to ‘C:’ disk

Project Properties

Project->Properties->Configuration Properties

头文件

VC++ Directories->General

VS2022 directories

VS2022 header2

库链接

Linker->General

VS2022 linker1

Spectre mitigations in MSVC

vs2017/vs2019

VS2022 c++