1、从github上下载boost
git clone --recursive https://github.com/boostorg/boost.git boost
或者
git clone https://github.com/boostorg/boost.git
cd boost
git submodule init
git submodule update
2、创建编译工具
/bootstrap.sh --prefix=/home/wl/boost
构建完成后输出
Building Boost.Build engine with toolset gcc... tools/build/src/engine/b2
Detecting Python version... 3.7
Detecting Python root... /home/wl/anaconda3
Unicode/ICU support for Boost.Regex?... not found.
Generating Boost.Build configuration in project-config.jam for gcc...
Bootstrapping is done. To build, run:
./b2
To generate header files, run:
./b2 headers
To adjust configuration, edit 'project-config.jam'.
Further information:
- Command line help:
./b2 --help
- Getting started guide:
http://www.boost.org/more/getting_started/unix-variants.html
- Boost.Build documentation:
http://www.boost.org/build/
3、编译安装
sudo ./b2 install