分享

centos安装编译使用boost库

 honeyeyo 2016-07-22
1. 下载源码:www.boost.org/users/download/

2. 安装gcc: $ yum -y install gcc
                     yum -y install gcc-c++
3. 切换到boost源码目录下:
  $  chmod +x bootstrap.sh
  $  ./bootstrap.sh
  #   若碰到还有无法执行的脚本 如build.sh 同样要修改权限
  $ ./bjam install
  #######等待编译结束###########
 4.  新建脚本,内容如下:
#!/bin/sh
#boost settings
centos <wbr>安装 <wbr>编译 <wbr>使用 <wbr>boost库
BOOST_ROOT=源码目录
centos <wbr>安装 <wbr>编译 <wbr>使用 <wbr>boost库 BOOST_INCLUDE
=/usr/local/include/boost-1_50_0 //根据不同版本修改版本号
centos <wbr>安装 <wbr>编译 <wbr>使用 <wbr>boost库BOOST_LIB
=/usr/local/lib
  export BOOST_ROOT BOOST_INCLUDE BOOST_LIB

 保存到:/etc/profile.d/boost.sh

 $chmod +x /etc/profile.d/boost.sh
 $ /etc/profile.d/boost.sh
 5 .切换到root权限
 $ ldconfig /usr/local/lib
至此boost库可用

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多