首页 > 代码库 > boost安装

boost安装

1. 下载boost:http://www.boost.org/
2. 解压
3. 添加一个BOOST_ROOT环境环境变量:
vi ~/.bash_profile
export BOOST_ROOT=$HOME/boost_1_58_0
4. 安装
cd $HOME/boost_1_58_0
./bootstrap.sh --prefix=$HOME/
./b2 install -j30
5. 配置库和头文件的环境变量
vi ~/.bash_profile
export PATH=$PATH:$HOME/bin
export C_INCLUDE_PATH=$C_INCLUDE_PATH:$HOME/include
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$HOME/include
export LIBRARY_PATH=$LIBRARY_PATH:$HOME/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/lib

boost安装