转载请注明出处:

http://www.cnblogs.com/darkknightzh/p/5797940.html

参考网址:

http://www.boost.org/doc/libs/1_61_0/more/getting_started/unix-variants.html

http://blog.csdn.net/tedious/article/details/6793544

说明:boost库包含两部分:无需编译的头文件,及单独编译的库。单独编译的库如下:

Boost.Chrono

Boost.Context

Boost.Filesystem

Boost.GraphParallel

Boost.IOStreams

Boost.Locale

Boost.MPI

Boost.ProgramOptions

Boost.Python (see the Boost.Python build documentation before building and installing it)

Boost.Regex

Boost.Serialization

Boost.Signals

Boost.System

Boost.Thread

Boost.Timer

Boost.Wave

A few libraries have optional separately-compiled binaries:

Boost.DateTime has a binary component that is only needed if you're using its to_string/from_string or serialization features, or if you're targeting Visual C++ 6.x or Borland.

Boost.Graph also has a binary component that is only needed if you intend to parse GraphViz files.

Boost.Math has binary components for the TR1 and C99 cmath functions.

Boost.Random has a binary component which is only needed if you're using random_device.

Boost.Test can be used in “header-only” or “separately compiled” mode, although separate compilation is recommended for serious use.

Boost.Exception provides non-intrusive implementation of exception_ptr for 32-bit _MSC_VER==1310 and _MSC_VER==1400 which requires a separately-compiled binary. This is enabled by #define BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR.

安装步骤(首先下载并解压缩文件,并cd到该文件夹内):

1. 运行bootstrap.sh:后面加上需要编译的库(如果不加的话,貌似只会编译最小的库,即包含基本功能的库)需要编译的自己选(可以见参考网址2里面完全编译)。

./bootstrap.sh --with-libraries= system,filesystem, thread,python

经过上命令后,可以看到,会编译哪些库:

2. 运行./b2。直接这样用,提示权限不够,所以使用如下命令就可以成功:

sudo ./b2

成功编译了这些文件(和上图对应的库):

3. 将编译好的文件使用cp命令拷贝到系统的目录:

sudo cp -a stage/lib /usr/local
sudo cp -a boost /usr/local/include/boost

ps. 貌似这些目录不是ubuntu默认的库目录。ubuntu默认库目录是/usr/lib。所以上面拷贝时,可以使用:

sudo cp -a stage/lib /usr
sudo cp -a boost /usr/include

说明:

1. 使用--show-libraries查看哪些需要单独编译:

./bootstrap.sh --show-libraries

2. 全编译(没试过):

./bootstrap.sh --with-libraries= atomic,chrono,container,context,coroutine,coroutine2,date_time,exception,filesystem,graph,graph_parallel,iostreams,locale,with-log,math,metaparse,mpi,program_options,python,random,regex,serialization,signals,system,test,thread,timer,type_erasure,wave

在另一台电脑上,使用./bootstrap.sh --with-libraries= system,filesystem, thread,python,结果全编译出来了。。。

(原)ubuntu16中编译boost1.61.0库的更多相关文章

  1. vs2013编译boost1.55.0 32/64位

    在使用vs2013编译boost-1.55.0之前,先要给boost做下修改: boost_1_55_0\boost\intrusive\detail\has_member_function_call ...

  2. 在vs2010中编译log4cxx-0.10.0详细方法(从下载、编译、解决错误详细介绍)

    在vs2010中编译log4cxx-0.10.0详细方法(从下载.编译.解决错误详细介绍) http://blog.sina.com.cn/s/blog_a459dcf501013tbn.html

  3. 使用MSYS2环境中编译Qt5.5.0的补丁

    Qt的configure脚本对MinGW静态编译支持不太完善,总有这样那样的问题.如果你不嫌麻烦,而且可以接受高版本的Qt的话,可以考虑使用我做的补丁在MSYS2环境中编译.Qt5.4.2的补丁 Qt ...

  4. 在VS中编译Opencascade6.6.0

    话说,OpenCASCADE团队真的很给力,版本更新速度也是嗖嗖地.依稀记得上次编译OCC,那时候的第三方库.OCC本身几何引擎库,全都得自己编译. 于是,编译过程之艰苦也就可想而知了.最近重换系统, ...

  5. 在vs2010中编译log4cxx-0.10.0详细方法

    本文一共包含了17个步骤,按照下面的步骤就可以完成vs2010中编译log4cxx的工作了. 1. 下载 log4cxx 以及 apr 和 apr-util 源码: a) http://www.apa ...

  6. (原)Ubuntu16中编译caffe

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/5797526.html 参考网址: http://caffe.berkeleyvision.org/in ...

  7. (原)vs2013编译boost1.60库

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/5394236.html 参考网址: http://www.cnblogs.com/chuncn/arch ...

  8. CentOS7中编译安装redis5.0

    1. 环境介绍 CentOS7 (未安装Development Tools) 2. 下载Redis5.0-rc3 wget -O redis-5.0-rc3.tar.gz https://github ...

  9. 在vs2010中编译log4cxx-0.10.0具体方法(从下载、编译、解决错误具体介绍)

    一. 简单介绍 log4cxx是Java社区著名的log4j的c++移植版.用于为C++程序提供日志功能,以便开发人员对目标程序进行调试和审计,log4cxx是apache软件基金会的开源项目,基于A ...

随机推荐

  1. JS中的== 、===的用法和区别。

    JS中的== .===的用法和区别.[转] == 和 != 比较若类型不同,先偿试转换类型,再作值比较,最后返回值比较结果 . 而  === 和 !== 只有在相同类型下,才会比较其值 ======= ...

  2. Hadoop集群日常运维

    (一)备份namenode的元数据 namenode中的元数据非常重要,如丢失或者损坏,则整个系统无法使用.因此应该经常对元数据进行备份,最好是异地备份. 1.将元数据复制到远程站点 (1)以下代码将 ...

  3. 关于HTML5中audio标签在手机中的autoplay

    这个问题是我最头疼的: 问题描述:在开发手机网页的时候,苹果和三星的一些浏览器不能自动开始播放 解决办法:在这个页面上弹出一个层来触发audio标签的play()方法,或者你还可以 谷歌一下----& ...

  4. MrHuo.OAuthLoginLibs社会化登录组件Github

    今日写的博客 [原创]旧事重提:只配置参数实现OAuth2登录 引来很多园子里的朋友问候,所以今日花了一些时间整理了代码. 现已发布至github: MrHuo.OAuthLoginLibs:http ...

  5. ext4 grid edit 添加删除行

    extjs--grid动态添加一行和删除一行: (1)选择rowEditing时,添加一行后的编辑方式为----startEdit(record,columnHeader) (2)选择cellEdit ...

  6. 一个人的旅行--hdu2066

    一个人的旅行 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Subm ...

  7. hdu 1142 A Walk Through the Forest

    http://acm.hdu.edu.cn/showproblem.php?pid=1142 这道题是spfa求最短路,然后dfs()求路径数. #include <cstdio> #in ...

  8. Mysql 插入记录时检查记录是否已经存在,存在则更新,不存在则插入记录SQL

    我们在开发数据库相关的逻辑过程中, 经常检查表中是否已经存在这样的一条记录, 如果存在则更新或者不做操作, 如果没有存在记录,则需要插入一条新的记录. 这样的逻辑固然可以通过两条sql语句完成. SE ...

  9. TXMLDocument换行的两种方案

    手写代码:   XML格式化使用msxml引擎,Delphi代码如下: Delphi/Pascal code   ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...

  10. Transposed Matrix

    Transposed Matrix In linear algebra, the transpose of a matrix A is another matrix AT (also written  ...