Boost linux安装

来源:互联网 发布:守望先锋帧数优化补丁 编辑:程序博客网 时间:2024/06/06 01:14

前期准备:boost中,用到了别的函数库,所以为了使用boost中相应的功能,需要先安装系统中可能缺失的库 

apt-get install mpi-default-dev  #安装mpi库

apt-get install libicu-dev     #支持正则表达式的UNICODE字符集 

apt-get install python-dev     #需要python的话

apt-get install libbz2-dev     #如果编译出现错误:bzlib.h: No such file or directory


5   Prepare to Use a Boost Library Binary

If you want to use any of the separately-compiled Boost libraries, you'll need to acquire library binaries.

5.1   Easy Build and Install

Issue the following commands in the shell (don't type $; that represents the shell's prompt):

$ cd path/to/boost_1_60_0$ ./bootstrap.sh --help

Select your configuration options and invoke ./bootstrap.sh again without the --help option. Unless you have write permission in your system's /usr/local/ directory, you'll probably want to at least use

$ ./bootstrap.sh --prefix=path/to/installation/prefix

to install somewhere else. Also, consider using the --show-libraries and --with-libraries=library-name-list options to limit the long wait you'll experience if you build everything. Finally,

$ ./b2 install

will leave Boost binaries in the lib/ subdirectory of your installation prefix. You will also find a copy of the Boost headers in the include/ subdirectory of the installation prefix, so you can henceforth use that directory as an #include path in place of the Boost root directory.

skip to the next step

5.2   Or, Build Custom Binaries

If you're using a compiler other than your system's default, you'll need to use Boost.Build to create binaries.

You'll also use this method if you need a nonstandard build variant (see the Boost.Build documentation for more details).

Boost.CMake

There is also an experimental CMake build for boost, supported and distributed separately. See the Boost.CMake wiki page for more information.

5.2.1   Install Boost.Build

Boost.Build is a text-based system for developing, testing, and installing software. First, you'll need to build and install it. To do this:

  1. Go to the directory tools/build/.
  2. Run bootstrap.sh
  3. Run b2 install --prefix=PREFIX where PREFIX is the directory where you want Boost.Build to be installed
  4. Add PREFIX/bin to your PATH environment variable.


0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 老人拔不了牙怎么办 补过的牙齿变黑怎么办 受伤牙齿脱落后怎么办 一岁多宝宝牙齿脱落怎么办 老年人门牙掉了怎么办 老年人磨牙掉了怎么办 种植牙牙龈发炎怎么办 种植牙牙龈红肿怎么办 种植牙后牙龈怎么办 种植牙牙龈感染怎么办 种植牙牙龈向上怎么办 上门牙有点突出怎么办 电脑语音电流声怎么办 麦克风说不了话怎么办 耳机说不了话怎么办 饿了么小休超时怎么办 美团清退代理商怎么办 小孩龟头肿很大怎么办 16岁不想上学怎么办 宜宾南门桥逆行怎么办 去加拿大探亲签证怎么办 重庆两路口到菜坝园怎么办 摄像头uid忘了怎么办 电梯钢丝绳断了怎么办 在小区车被砸了怎么办 甲米天气下雨怎么办 电影院不开空调怎么办 电脑总弹广告怎么办 下雨天了怎么办神接 天下雨了怎么办套路 下雨天了怎么办 新套路 万达兑换券过期怎么办 直播间没一个人怎么办 快手直播人少怎么办 快手直播人气少怎么办 被火山主播踢出房间怎么办 遇到同事的排挤怎么办 交警处理事故不公平怎么办 派出所处理事情不公平怎么办 淘宝号不健康了怎么办 作业盒子忘记密码怎么办