BOOST安装
1,解压
tar xzvf boost_1_60_0.tar.gz
2,进入执行
./bootstrap.sh,
3,执行
./b2 cxxflags="-std=c++11"
4,执行
sudo ./b2 install
5,编辑vi ~.profile 增加以下内容:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
测试demo:
#include <iostream>
#include <boost/version.hpp>
#include <boost/config.hpp>
using namespace std;
int main()
{
cout << BOOST_VERSION << endl;
cout << BOOST_LIB_VERSION << endl;
cout << BOOST_PLATFORM << endl;
cout << BOOST_COMPILER << endl;
cout << BOOST_STDLIB << endl;
return 0;
}