下载boost源码

在官网下载指定版本的源码
http://www.boost.org/users/history/

编译boost源码

1.进入源码目录执行./bootstrap.sh生成编译工具

2.编辑project-config.jam文件,替换如下内容

# define platform name of ndk
import os ;
if [ os.name ] = CYGWIN || [ os.name ] = NT
{androidPlatform = windows-x86_64 ;
}
else if [ os.name ] = LINUX
{androidPlatform = linux-x86_64 ;
}
else if [ os.name ] = MACOSX
{androidPlatform = darwin-x86 ;
}# replace with your own ndk path.eg:/usr/ndk/android-ndk-r12b
ANDROID_NDK = "/path/to/your/dnk" ;# compile with gcc, you can change compiler to clang or others
using gcc : android4.9 : $(ANDROID_NDK)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(androidPlatform)/bin/arm-linux-androideabi-g++ :
<archiver>$(ANDROID_NDK)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(androidPlatform)/bin/arm-linux-androideabi-ar
<ranlib>$(ANDROID_NDK)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(androidPlatform)/bin/arm-linux-androideabi-ranlib
<compileflags>-I$(ANDROID_NDK)/platforms/android-21/arch-arm/usr/include
<compileflags>-I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/4.9/include
<compileflags>-I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/4.9/include/backward
<compileflags>-I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include
<compileflags>-fexceptions
<compileflags>-frtti
<compileflags>-fpic
<compileflags>-ffunction-sections
<compileflags>-funwind-tables
<compileflags>-D__ARM_ARCH_5__
<compileflags>-D__ARM_ARCH_5T__
<compileflags>-D__ARM_ARCH_5E__
<compileflags>-D__ARM_ARCH_5TE__
<compileflags>-D__ARM_ARCH_7__
<compileflags>-D__ARM_ARCH_7A__
<compileflags>-Wno-psabi
<compileflags>-march=armv7-a
<compileflags>-mtune=xscale
<compileflags>-mfloat-abi=softfp
<compileflags>-marm
<compileflags>-mthumb
<compileflags>-Os
<compileflags>-std=gnu++11
<compileflags>-fomit-frame-pointer
<compileflags>-fno-strict-aliasing
<compileflags>-finline-limit=64
<compileflags>-Wa,--noexecstack
<compileflags>-DANDROID
<compileflags>-D__ANDROID__
<compileflags>-D__ARM_EABI__
<compileflags>-DNDEBUG
<compileflags>-O2
<compileflags>-g
;# project default compiler
project : default-build <toolset>gcc-android4.9 ;# replace with libraries you wanna to build
libraries = --with-container --with-coroutine  --with-fiber --with-graph --with-graph_parallel --with-log --with-metaparse --with-python --with-test --with-type_erasure --with-atomic --with-date_time --with-program_options --with-chrono --with-context --with-iostreams --with-locale --with-mpi --with-serialization --with-signals --with-timer --with-wave --with-math --with-random --with-exception --with-filesystem --with-thread --with-system --with-regex --with-program_options

3、执行以下命令
./b2 toolset=gcc-android4.9 link=static threading=multi target-os=linux --stagedir=android_build
toolset表示指定编译工具,link表示编译成静态库,threading表示使用多线程编译,–stagedir表示指定编译文件生成目录名
4、将编译好的boost库放到指定文件夹下便于引用
sudo ./b2 install --prefix=/your/path/to/install
eg:
sudo ./b2 install --prefix=/usr/boost/android_boost
这样在使用的时候,可以将该路径加入到你的代码中去查找相关的库等。

参考:https://github.com/teamarkstudio/boost_for_android

ubuntu16.04编译boost for Android(boost 1.65)相关推荐

  1. Ubuntu16.04编译poco库

    Ubuntu16.04编译poco库 概述 下载 编译 解压 编译 完整编译 部分编译 编译 安装 参考文章 概述 Poco C++库是一系列C++类库,类似Java类库,.Net框架,Apple的C ...

  2. Ubuntu16.04编译android6.0.1源码记录

    目录 目录 一.安装环境 二.下载源码 1.下载repo 2.初始化repo 3.同步源代码 关于驱动 三.编译源码 四.导入源码到AS 五.刷入真机 六.修改源码 总结: 3.同步源代码 关于驱动 ...

  3. ubuntu16.04 编译opencv4和opencv_contrib

    ubuntu16.04 编译opencv4和opencv_contrib 下载源码 安装最新的cmake 使用cmake-gui配置cmake文件 make && install 添加 ...

  4. Ubuntu16.04编译RK3399:make kernel.img error

    RK3399开源资料: http://www.t-firefly.com/doc/product/info/id/100.html 1.问题: ubuntu16.04编译内核Kernel出现错误:   ...

  5. Ubuntu16.04编译高博的ORBSLAM2_with_pointcloud_map详细过程

    我在编译过程中主要参考了以下几篇博客: Ubuntu16.04编译高博的ORBSLAM2_with_pointcloud_map_Andyoyo007的博客-CSDN博客编译高博ORBSLAM2_wi ...

  6. 16.04编译android 7.0,ubuntu16.04 编译Android5.1报错

    hi kylin team, 我使用 ubuntu16.04 构建 android 编译环境后编译 android5.1 时出现如下报错.请向开发团队反馈看能否给出解决方案,谢谢! 当我使用 ubun ...

  7. Ubuntu16.04编译Android 6.0系统源码过程简要记录总结

    一,安装VMware Workstation,百度网盘下载(内含注册机) 链接: https://pan.baidu.com/s/1wz4hdNQBikTvyUMNokSVYg 提取码: yed7 V ...

  8. ubuntu16.04编译android6_r1源码绕坑贴

    1 前言 经过3天奋战,终于在Ubuntu 16.04上把Android 6.0的源码编译出来了,各种配置,各种error,各种爬坑,特写此博客记录爬坑经历.先上图,Ubuntu上编译完后成功运行模拟 ...

  9. Ubuntu16.04编译Android10源码并刷机Pixel

    一.环境描述 电脑配置: 系统:Windows10 内存:16GB 硬盘:500GB 软件环境: VirtualBox虚拟机 虚拟配置: 系统:Ubuntu16.04.7 内存:9GB 硬盘:300G ...

  10. linux ubuntu16.04 编译opencv教程(没编过,有时间再弄,推流不用opencv也行的)

    文章目录 下源码 编译 配置opencv环境 下源码 https://github.com/opencv/opencv/releases/tag/4.4.0 然后在ubuntu里建个文件夹把它扔进去, ...

最新文章

  1. 消防报警联动监控计算机中心,楼宇消防报警联动监控计算机中心实验设备
  2. 音频数据建模全流程代码示例:通过讲话人的声音进行年龄预测
  3. oracle 中关于null的操作
  4. 初探HTML5的本地存储
  5. 匿名内部类创建线程的三种方式
  6. 「Python」Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-Yt_rRN/grpcio
  7. C#文件和文件文件夹按时间、名称排序-顺序与倒序
  8. listview侧滑删除
  9. 动态调整线程池_调整线程池的重要性
  10. java图片失真_java 图片合成 解决图片失真问题
  11. linux下python开发工具_Python开发工具 Wing IDE
  12. c面向对象 java_JAVA基础--面向对象08
  13. cpu —>内存—>硬盘这种方式是不是更慢?
  14. sql broker_使用SQL Server Service Broker进行异步处理
  15. rabbitmq direct 多个消费者_rabbitMQ消息队列入门介绍
  16. 转置矩阵(Transpose of a matrix)
  17. 需求调研前的准备工作
  18. 佛系推荐《骡子》是经典又好看的动作电影毋庸置疑
  19. 记录人生第一个网站,以及相对路径图片无法显示的问题
  20. Swift.自定制相册,实现首个cell是拍照功能

热门文章

  1. db2 获取返回的游标_MySQL ------ 存储过程与游标简单使用
  2. python 函数递归一次增加一次变量_python函数局部变量、全局变量、递归知识点总结...
  3. 红队技巧-域渗透的协议利用
  4. dnslog盲注原理
  5. VUE 入门基础(3)
  6. 登录界面点击登录后如何延迟提示成功的div的显示时间并跳转
  7. CSS未知宽高元素水平垂直居中
  8. 如何用纯 CSS 创作一盘传统蚊香
  9. jquery ready方法实现原理
  10. 在Windows运行Python程序