Redhat下 Boost库1.54编译安装
2013-12-14 11:17
190 查看
a. 在 www.boost.org 下载 boost1.54 源码包,解压缩。
b. 进入目录后,运行 ./bootstrap.sh ,会生成一个 bjam 的可执行程序。
c. 运行 ./bjam 进行编译。等待...
d. 编译成功后,在 bjam 同级文件夹下,会有 stage、bin.v2 两个目录。bin.v2 中存的是编译时生成的目标文件,stage 中放的是 boost 的库文件。
e. 新建目录 /usr/share/boost_1_54/ 。把 stage、boost 两个目录拷贝至 /usr/share/boost_1_54/ 下。stage中为
boost 库文件,boost中为 boost 头文件。
f. 修改 /etc/profile 文件,在后面添加三个环境变量:
export BOOST_ROOT=/usr/share/boost_1_54
export BOOST_INCLUDE=/usr/share/boost_1_54
export BOOST_LIB=/usr/share/boost_1_54/stage/lib
运行 source /etc/profile 使之生效。
g. 新建一个到头文件目录的链接:
ln -s /usr/share/boost_1_43/boost/ /usr/include/boost
h. 至此,boost 可用。
===============或者=============
linux平台上编译安装boost库
1.首先解压缩
tar -zxvf boost.1.49.0.tar.gz
2.然后进入解压缩后的文件夹编译boost的编译器jam
3.执行编译出bjam
./bootstrap.sh
4.编译完后在这个目录下有编译出的bjam文件
bjam
5.进行编译
./bjam release install
系统默认会将include拷贝到/usr/local/include/boost/中
将lib拷贝到/usr/local/lib下
===============配置环境变量=============
1)~/.bash_profile中增加
export BOOST_ROOT=/usr/share/boost_1_54
export BOOST_INCLUDE=/usr/local/include
export BOOST_LIB=/usr/local/lib
2)/etc/ld.so.conf.d
中新建 ld.custom.so.conf
填入:/usr/lib64
/usr/local/lib
(注:第一个为其他动态库位置;第二个为boost动态库位置)
然后输入:ldconfig即可
b. 进入目录后,运行 ./bootstrap.sh ,会生成一个 bjam 的可执行程序。
c. 运行 ./bjam 进行编译。等待...
d. 编译成功后,在 bjam 同级文件夹下,会有 stage、bin.v2 两个目录。bin.v2 中存的是编译时生成的目标文件,stage 中放的是 boost 的库文件。
e. 新建目录 /usr/share/boost_1_54/ 。把 stage、boost 两个目录拷贝至 /usr/share/boost_1_54/ 下。stage中为
boost 库文件,boost中为 boost 头文件。
f. 修改 /etc/profile 文件,在后面添加三个环境变量:
export BOOST_ROOT=/usr/share/boost_1_54
export BOOST_INCLUDE=/usr/share/boost_1_54
export BOOST_LIB=/usr/share/boost_1_54/stage/lib
运行 source /etc/profile 使之生效。
g. 新建一个到头文件目录的链接:
ln -s /usr/share/boost_1_43/boost/ /usr/include/boost
h. 至此,boost 可用。
===============或者=============
linux平台上编译安装boost库
1.首先解压缩
tar -zxvf boost.1.49.0.tar.gz
2.然后进入解压缩后的文件夹编译boost的编译器jam
3.执行编译出bjam
./bootstrap.sh
4.编译完后在这个目录下有编译出的bjam文件
bjam
5.进行编译
./bjam release install
系统默认会将include拷贝到/usr/local/include/boost/中
将lib拷贝到/usr/local/lib下
===============配置环境变量=============
1)~/.bash_profile中增加
export BOOST_ROOT=/usr/share/boost_1_54
export BOOST_INCLUDE=/usr/local/include
export BOOST_LIB=/usr/local/lib
2)/etc/ld.so.conf.d
中新建 ld.custom.so.conf
填入:/usr/lib64
/usr/local/lib
(注:第一个为其他动态库位置;第二个为boost动态库位置)
然后输入:ldconfig即可
相关文章推荐
- Redhat下 Boost库1.54编译安装
- Redhat下 Boost库1.54编译安装
- centos6.4 编译安装boost.python 1.54--来自官方文档
- boost 1.54 编译安装
- linxux redhat C++ boost下编译安装
- RedHat下编译安装Boost
- 【原】Boost下载安装编译配置使用指南(含Windows和Linux)
- Windows VS boost 安装编译
- windows下编译安装BOOST
- linux下boost编译安装
- REDHAT5下编译安装LAMP环境
- 在X64 RedHat5 或者 RedHat4 下编译安装PHP出现的各种问题及解决
- windows下用cmake编译安装boost1.40
- Linux 编译安装Boost
- Redhat5.8 环境下编译安装 Redis 并将其注册为系统服务
- REDHAT AS4U4下编译安装squid-2.6.17
- xgboost C++ window编译问题解决与安装
- RedHat/CentOS源码编译安装MySQL5.6.12
- 01-postgres9.4.5在redhat6.5环境下源码编译安装(2016-11-08)
- 在CentOS 5/RedHat Enterprise 5.3上编译安装GeoIP