CentOS7 安装boost_1_52

CentOS7 安装boost_1_52

最近想学习一下boost库,在CentOS7上安装。在CSDN上找了很多帖子,但是自己装时总是报错。之后在google上找到了一些解决办法,在此记录整个安装过程。
1、下载boost安装包:[boost下载地址] (https://www.boost.org/users/history/)
2、安装依赖包:

yum install gcc gcc-c++ bzip2 bzip2-devel bzip2-libs python-devel zlib-devel -y

3、初始化环境

[root@c_plus_clz boost_1_52_0]# ./bootstrap.sh 
Building Boost.Build engine with toolset gcc... tools/build/v2/engine/bin.linuxx86_64/b2
Detecting Python version... 2.7
Detecting Python root... /usr
Unicode/ICU support for Boost.Regex?... not found.
Backing up existing Boost.Build configuration in project-config.jam.3
Generating Boost.Build configuration in project-config.jam...

Bootstrapping is done. To build, run:

    ./b2

To adjust configuration, edit 'project-config.jam'.
Further information:

   - Command line help:
     ./b2 --help

   - Getting started guide: 
     http://www.boost.org/more/getting_started/unix-variants.html

   - Boost.Build documentation:
     http://www.boost.org/boost-build2/doc/html/index.html

4、编译

[root@c_plus_clz boost_1_52_0]# ./b2 

Building the Boost C++ Libraries.


Performing configuration checks

    - 32-bit                   : no
    - 64-bit                   : yes
    - x86                      : yes
    - has_icu builds           : no
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
    - iconv (libc)             : yes
    - icu                      : no
    - icu (lib64)              : no
    - gcc visibility           : yes
    - long double support      : yes
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.

Component configuration:

    - chrono                   : building
    - context                  : building
    - date_time                : building
    - exception                : building
    - filesystem               : building
    - graph                    : building
    - graph_parallel           : building
    - iostreams                : building
    - locale                   : building
    - math                     : building
    - mpi                      : building
    - program_options          : building
    - python                   : building
    - random                   : building
    - regex                    : building
    - serialization            : building
    - signals                  : building
    - system                   : building
    - test                     : building
    - thread                   : building
    - timer                    : building
    - wave                     : building

...patience...
...patience...
...patience...
...patience...
...found 8773 targets...
The Boost C++ Libraries were successfully built!

The following directory should be added to compiler include paths:

    /home/boost_1_52_0

The following directory should be added to linker library paths:

    /home/boost_1_52_0/stage/lib

5、安装

sudo ./b2 install --prefix=/usr/local

参考:https://blog.csdn.net/guanyijun123/article/details/45745999

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值