开发服务器之boost_1.52 安装

来源:互联网 发布:mac有程序阻止关机 编辑:程序博客网 时间:2024/05/21 08:00

OS: SLES 11

1、安装 zlib、bzip2、ICU、MPICH、PYTHON开发包(光盘自带)

2、tar zxvf boost_1_52_0.tar.gz

3、./bootstrap.sh --with-icu

4、修改“3”生成的project-config.jam,在最后添加"using mpi ; "//备注,mpi和分号之间是有空格的

5、link一般为static就行了,发布的时候一般把boost库编译进程序中了,这样就不用带共享库文件了。

./b2 --build-type=complete --layout=versioned variant=release link=static threading=multi runtime-link=static stage
./b2 --build-type=complete --layout=versioned variant=debug link=static threading=multi runtime-link=static stage

./b2 --build-type=complete --layout=versioned variant=release link=static threading=multi runtime-link=shared stage
./b2 --build-type=complete --layout=versioned variant=debug link=static threading=multi runtime-link=shared stage

./b2 --build-type=complete --layout=versioned variant=release link=shared threading=multi runtime-link=shared stage
./b2 --build-type=complete --layout=versioned variant=debug link=shared threading=multi runtime-link=shared stage

     以上方法编译出来的boost所有的库都齐全,include添到加C_INCLUDE_PATH中,lib添加到LD_LIBRARY_PATH中

原创粉丝点击