CentOS6.5上Boost库编译安装全记录

前端之家收集整理的这篇文章主要介绍了CentOS6.5上Boost库编译安装全记录前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

资源准备

由于具体安装编译内容很长,所以下面用…来表示

首先得安装gcc,g++,等环境

  1. # yum install gcc g++ bzip2 bzip2-devel bzip2-libs Python-devel -y
  2. ...
  3. Installed:
  4. bzip2-devel.x86_64 0:1.0.5-7.el6_0
  5.  
  6. Complete!

下载boost 源码,解压、编译

  1. # wget http://ufpr.dl.sourceforge.net/project/boost/boost/1.61.0/boost_1_61_0.tar.bz2
  2. ...
  3. 100%[======================================>] 85,202,254 354K/s in 7m 31s
  4.  
  5. 2016-07-05 11:12:45 (184 KB/s) - 已保存 boost_1_61_0.tar.bz2 [85202254/85202254])
  6.  
  7. # tar jxvf boost_1_61_0.tar.bz2
  8. ...
  9. boost_1_61_0/libs/iostreams/test/seekable_file_test.cpp
  10. # cd boost_1_61_0
  11. [~/boost_1_61_0]# sh ./bootstrap.sh
  12. [~/boost_1_61_0]# ./b2

11:30:05
OK,现在我也在等待,看看具体情况
有问题的话,就具体问题再行修改
11:40:05
已经过了十分钟了,还没有好,不过我看到是用的我上次升级的gcc4.8.5在编译。
11:48:30
刚刚去了趟洗手间,意外的顺利,直接好了

  1. ...
  2. common.copy stage/lib/libboost_wave.so.1.61.0
  3. ln-UNIX stage/lib/libboost_wave.so
  4. ...updated 1139 targets...
  5.  
  6.  
  7. The Boost C++ Libraries were successfully built!
  8.  
  9. The following directory should be added to compiler include paths:
  10.  
  11. /root/download/boost_1_61_0
  12.  
  13. The following directory should be added to linker library paths:
  14.  
  15. /root/download/boost_1_61_0/stage/lib

安装

  1. [~/boost_1_61_0]# sudo ./b2 install --prefix=/usr/local/
  2. ...
  3. gcc.archive bin.v2/libs/test/build/gcc-4.4.7/release/link-static/threading-multi/libboost_test_exec_monitor.a
  4. common.copy /usr/local/lib/libboost_test_exec_monitor.a
  5. ...updated 14227 targets...

完结撒花

猜你在找的CentOS相关文章