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

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

资源准备

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

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

# yum install gcc g++ bzip2 bzip2-devel bzip2-libs Python-devel -y
    ...
Installed:
  bzip2-devel.x86_64 0:1.0.5-7.el6_0                                            

Complete!

下载boost 源码,解压、编译

# wget http://ufpr.dl.sourceforge.net/project/boost/boost/1.61.0/boost_1_61_0.tar.bz2
    ...
100%[======================================>] 85,202,254   354K/s   in 7m 31s  

2016-07-05 11:12:45 (184 KB/s) - 已保存 “boost_1_61_0.tar.bz2” [85202254/85202254])

# tar jxvf boost_1_61_0.tar.bz2 
    ...
boost_1_61_0/libs/iostreams/test/seekable_file_test.cpp
# cd boost_1_61_0
[~/boost_1_61_0]# sh ./bootstrap.sh 
[~/boost_1_61_0]# ./b2

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

...
common.copy stage/lib/libboost_wave.so.1.61.0
ln-UNIX stage/lib/libboost_wave.so
...updated 1139 targets...


The Boost C++ Libraries were successfully built!

The following directory should be added to compiler include paths:

    /root/download/boost_1_61_0

The following directory should be added to linker library paths:

    /root/download/boost_1_61_0/stage/lib

安装

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

完结撒花

原文链接:https://www.f2er.com/centos/381739.html

猜你在找的CentOS相关文章