服务器的系统是redhat7.2,64位x86。
-
1.下载最新boost
-
2.解压,进入目录。
[root@xxx opt]# tar -xzvf boost_1_63_0.tar.gz
[root@xxx opt]# cd boost_1_63_0/
- 3.运行bootstrap.sh,产生可执行程序bjam。
[root@wulab opt]# ./bootstrap.sh
- 4.运行bjam编译。
[root@xxx opt]# ./bjam
- 5.建立boost新目录。将编译产生的stage(库文件)和bin.v(目标文件)两个文件夹移动到boost新目录下。
[root@xxx opt]# mkdir /usr/share/boost_1_63_0
[root@xxx opt]# cp -r stage/ bin.v2/ /usr/share/boost_1_63_0/
- 6.加入环境变量,souce生效。
[root@xxx opt]# vim /etc/profile
export BOOST_ROOT=/usr/share/boost_1_63_0
export BOOST_INCLUDE=/usr/share/boost_1_63_0
export BOOST_LIB=/usr/share/boost_1_63_0/stage/lib
>source /etc/profile
- 7.建立软连接。
ln -s /usr/share/boost_1_43/boost/ /usr/include/boost
至此,boost安装完毕!
- some codes about my compiling
[root@xxx boost_1_63_0]# ./bjam
Performing configuration checks
- 32-bit : no
- 64-bit : yes
- arm : no
- mips1 : no
- power : no
- sparc : no
- x86 : yes
Building the Boost C++ Libraries.
- symlinks supported : yes
- C++11 mutex : no
- lockfree boost::atomic_flag : yes
- Boost.Config Feature Check: cxx11_auto_declarations : no
- Boost.Config Feature Check: cxx11_constexpr : no
- Boost.Config Feature Check: cxx11_defaulted_functions : no
- Boost.Config Feature Check: cxx11_final : yes
- Boost.Config Feature Check: cxx11_hdr_mutex : no
- Boost.Config Feature Check: cxx11_hdr_tuple : no
- Boost.Config Feature Check: cxx11_lambdas : no
- Boost.Config Feature Check: cxx11_noexcept : no
- Boost.Config Feature Check: cxx11_nullptr : no
- Boost.Config Feature Check: cxx11_rvalue_references : no
- Boost.Config Feature Check: cxx11_template_aliases : no
- Boost.Config Feature Check: cxx11_thread_local : no
- Boost.Config Feature Check: cxx11_variadic_templates : 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
- zlib : yes
- bzip2 : yes
- iconv (libc) : yes
- icu : no
- icu (lib64) : no
- native-atomic-int32-supported : yes
- native-syslog-supported : yes
- pthread-supports-robust-mutexes : yes
- compiler-supports-visibility : yes
- compiler-supports-ssse3 : yes
- compiler-supports-avx2 : yes
- 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.
- zlib : yes
- bzip2 : yes
Component configuration:
- atomic : building
- chrono : building
- container : building
- context : building
- coroutine : building
- coroutine2 : building
- date_time : building
- exception : building
- fiber : building
- filesystem : building
- graph : building
- graph_parallel : building
- iostreams : building
- locale : building
- log : building
- math : building
- metaparse : building
- mpi : building
- program_options : building
- python : building
- random : building
- regex : building
- serialization : building
- signals : building
- system : building
- test : building
- thread : building
- timer : building
- type_erasure : building
- wave : building
yuwq
2017/4/17
网友评论