参考:https://www.cnblogs.com/smallredness/p/9245127.html

下载boost源码
boost下载地址

解压到一个目录
tar -zxvf boost\_1\_66\_0.tar.gz
1、正常编译:
进入boost\_1\_66\_0目录中

cd boost\_1\_66\_0
./bootstrap.sh --with-libraries=all --with-toolset=gcc
--with-liraries:需要编译的库
--with-toolset:编译时使用的编译器


安装boost库
./b2 install --prefix=/usr
--prefix:boost库的安装目录,不加此参数,默认安装在/usr/local目录下。
--prefix:可以指定自己想安装的目录,里面包括应该安装的include和lib文件夹,把lib所在目录设定到动态连接库环境变量LD\_LIBRARY\_PATH即可)。

标签: 安装, Linux, 目录, 编译, boost, 详解

相关文章推荐

添加新评论,含*的栏目为必填