centos6.5安装boost_1_60版本需求

来源:互联网 发布:申万宏源手机交易软件 编辑:程序博客网 时间:2024/05/17 06:01

对于boost_1_60这个高版本的库文件,需要gcc6.x版本的编译器,centos6.5自带的gcc4.4.7编译会很多奇怪的错误。运行程序缺省库文件的时候,编辑/etc/ld.so.conf即可,不需要使用软连接的方式,第三方的库文件都是在/usr/local/lib或是/usr/loca/lib64,可以先查找系统中是否存在lib.so库文件,然后将lib.so文件的路径加入到/etc/ld.so.conf文件即可。


脚本,内容如下:

#!/bin/sh

#boost settings


centos <wbr>安装 <wbr>编译 <wbr>使用 <wbr>boost库
BOOST_ROOT=源码目录


centos 安装 编译 使用 boost库 BOOST_INCLUDE=/usr/local/include/boost-1_60_0
//根据不同版本修改版本号

centos 安装 编译 使用 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库可用


原创粉丝点击