Ubuntu 13.04编译boost1.54
2013-07-30 14:19
239 查看
因为要用基于GCC4.8.1的boost最新版本的库,默认apt-get install 安装的是boost1.53, 并且基于GCC4.7.3,不是我想要的。所以决定下载源代码自己编译。
下载(后面的路径可能会变,具体参考boost网站链接)
wget -O boost_1_54_0.tar.bz2 http://downloads.sourceforge.net/project/boost/boost/1.54.0/boost_1_54_0.tar.bz2?r=http%3A%2F%2Fwww.boost.org%2Fusers%2Fhistory%2Fversion_1_54_0.html&ts=1375162670&use_mirror=jaist 解压:
tar --bzip2 -xf ./boost_1_54_0.tar.bz2
开始编译,全部编译耗时太多,所以我仅选择我需要的库:
先用下面的命令查看有多少库可以编译:
./bootstrap.sh --show-libraries
Building Boost.Build engine with toolset gcc... tools/build/v2/engine/bin.linuxx86_64/b2
The following Boost libraries have portions that require a separate build
and installation step. Any library not listed here can be used by including
the headers only.
The Boost libraries requiring separate building and installation are:
- atomic
- chrono
- context
- coroutine
- date_time
- exception
- filesystem
- graph
- graph_parallel
- iostreams
- locale
- log
- math
- mpi
- program_options
- python
- random
- regex
- serialization
- signals
- system
- test
- thread
- timer
- wave
然后就编译我要的库:
./bootstrap.sh --with-libraries=system,filesystem,log,thread
Building Boost.Build engine with toolset gcc... tools/build/v2/engine/bin.linuxx86_64/b2
Unicode/ICU support for Boost.Regex?... not found.
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 然后运行下面的命令完成编译。
./b2
耐心等待。不过因为不是编译所有库。时间会少很多。以后需要再来编译。很快看到结果:
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
/usr/src/boost_1_54_0
The following directory should be added to linker library paths:
/usr/src/boost_1_54_0/stage/lib
忘记安装了。再运行./b2 install 命令,默认安装在
/usr/local/lib目录下
头文件在
/usr/local/include/boost目录下
install 后面可以加参数--prefix=/usr
下载(后面的路径可能会变,具体参考boost网站链接)
wget -O boost_1_54_0.tar.bz2 http://downloads.sourceforge.net/project/boost/boost/1.54.0/boost_1_54_0.tar.bz2?r=http%3A%2F%2Fwww.boost.org%2Fusers%2Fhistory%2Fversion_1_54_0.html&ts=1375162670&use_mirror=jaist 解压:
tar --bzip2 -xf ./boost_1_54_0.tar.bz2
开始编译,全部编译耗时太多,所以我仅选择我需要的库:
先用下面的命令查看有多少库可以编译:
./bootstrap.sh --show-libraries
Building Boost.Build engine with toolset gcc... tools/build/v2/engine/bin.linuxx86_64/b2
The following Boost libraries have portions that require a separate build
and installation step. Any library not listed here can be used by including
the headers only.
The Boost libraries requiring separate building and installation are:
- atomic
- chrono
- context
- coroutine
- date_time
- exception
- filesystem
- graph
- graph_parallel
- iostreams
- locale
- log
- math
- mpi
- program_options
- python
- random
- regex
- serialization
- signals
- system
- test
- thread
- timer
- wave
然后就编译我要的库:
./bootstrap.sh --with-libraries=system,filesystem,log,thread
Building Boost.Build engine with toolset gcc... tools/build/v2/engine/bin.linuxx86_64/b2
Unicode/ICU support for Boost.Regex?... not found.
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 然后运行下面的命令完成编译。
./b2
耐心等待。不过因为不是编译所有库。时间会少很多。以后需要再来编译。很快看到结果:
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
/usr/src/boost_1_54_0
The following directory should be added to linker library paths:
/usr/src/boost_1_54_0/stage/lib
忘记安装了。再运行./b2 install 命令,默认安装在
/usr/local/lib目录下
头文件在
/usr/local/include/boost目录下
install 后面可以加参数--prefix=/usr
相关文章推荐
- Ubuntu 13.04编译boost1.54
- Ubuntu 13.04编译boost1.54
- Ubuntu 13.04 用Sublime Text 2 编译运行 JAVA
- ubuntu 13.04编译安装xen4.4总结
- centos6.4 编译安装boost.python 1.54--来自官方文档
- Ubuntu 15.04 clang++ 3.6 编译boost 1.59/1.55
- windows7 编译boost1.54
- Ubuntu14.04下安装 boost (boost_1.54 最简单的方法)
- (原)ubuntu16中编译boost1.61.0库
- ubuntu13.04下载 编译android 4.0 (二) 内涵常见错误
- windows7 编译boost1.54
- Ubuntu13.04环境下载、编译Android源代码
- nagios-plugins Ubuntu13.04编译报错./stdio.h:456:1: ...
- Ubuntu13.04编译安装cmake2.8.12.2
- ubuntu14.04 osg3.0.1 qt4.8.6 boost1.58编译安装
- 编译ubuntu下面的boost 1.52
- Ubuntu下编译boost1.47
- Ubuntu编译安装boost并在eclipse C/C++中使用
- Ubuntu 13.04 编译环境配置及android 2.3 源代码编译时出现了以下错误 setrlimitsFromArray
- ubuntu13.04代理下载并编译android4.3源码