26 lines
554 B
Markdown
26 lines
554 B
Markdown
# 编译boost[^1]
|
|
|
|
## 编译环境
|
|
|
|
```shell
|
|
yum install -y gcc gcc-c++ make wget
|
|
```
|
|
|
|
## 下载
|
|
|
|
boost库[官方下载网页](https://www.boost.org/users/download/)
|
|
|
|
```shell
|
|
wget https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.gz
|
|
```
|
|
|
|
## 编译
|
|
|
|
```shell
|
|
tar -zxvf boost_1_77_0.tar.gz
|
|
cd boost_1_77_0
|
|
./bootstrap.sh
|
|
./b2 -a link=static cxxflags='-fPIC -std=c++11' --with-thread install
|
|
```
|
|
|
|
[^1]: Boost Getting Started on Unix Variants https://www.boost.org/doc/libs/1_77_0/more/getting_started/unix-variants.html#id25 |