文章目录

  • 关于 boost
  • 源码安装
  • 使用 brew 安装
    • 在 xcode 中使用 boost 库

关于 boost

Boost provides free peer-reviewed portable C++ source libraries.

官网:https://www.boost.org


源码安装

1、下载源码

https://www.boost.org/users/download/


2、Bootstrapping :Building B2 engine

$ cd .../boost_1_79_0
$ ./bootstrap.sh # 带选项
$ ./bootstrap.sh --with-libraries=all --with-toolset=clang

编译完成后,bjam 会被安装在 tools/build/src/engine/b2 目录下。

通过编辑 project-config.jam 来使用 --with-toolset 选项或调整配置。


  • 文档
    http://www.boost.org/more/getting_started/unix-variants.html
  • B2 文档
    http://www.boost.org/build/
  • Getting Started on Unix Variants
    https://www.boost.org/doc/libs/1_79_0/more/getting_started/unix-variants.html

# 查看 bjam 版本
$ cd tools/build/src/engine
$ ./bjam  --version
B2 4.8-git# 查看帮助
$ ./b2 --help

3、build

# 编译, 带上 -j8 命令 ,不然就是单核心编译
$ ./b2 -j8# clean
./b2 clean -j8# 生成头文件
./b2 headers
$ ./b2 -h
Invalid option: -husage: ./b2 [ options ] targets...-a      Build all targets, even if they are current.
-dx     Set the debug level to x (0-13,console,mi).
-fx     Read x instead of bootstrap.
-jx     Run up to x shell commands concurrently.
-lx     Limit actions to x number of seconds after which they are stopped.
-mx     Maximum target output saved (kb), default is to save all output.
-n      Don't actually execute the updating actions.
-ox     Mirror all output to file x.
-px     x=0, pipes action stdout and stderr merged into action output.
-q      Quit quickly as soon as a target fails.
-sx=y   Set variable x=y, overriding environment.
-tx     Rebuild x, even if it is up-to-date.
-v      Print the version of jam and exit.
--x     Option is ignored.

使用 brew 安装

使用 brew时,bjam 和 boost 是分开安装的。

$ brew install boost $ brew install bjam

安装成功后,安装包地址位于 /usr/local/Cellar/boost/
并软链接到 /usr/local/include/usr/local/lib
你可以在 /usr/local/lib 下找到 libboost_* 文件


在 xcode 中使用 boost 库

可参考文章:https://huangkx.blog.csdn.net/article/details/80323743


伊织 2022-06-23(四)

Mac 安装 boost(bjam)相关推荐

  1. C++:MAC安装Boost库文件并且使用CLion开发

    boost的filestem库 C++在17版本的标准库中引入了一个filesystem库,用来处理文件路径,以及文件访问.很多编译器对filesystem库的支持还不是很好.为了解决这个问题,可以临 ...

  2. 在Ubuntu和Mac OSX中安装boost

    boost in ubuntu 在ubuntu上使用apt-get install boost安装boost,build工具 bjam也会安装.安装后,头文件放到/usr/local/include/ ...

  3. mac安装和使用boost库

    一.安装boost和cmake brew install boost boost库依赖icu4c 使用Homebrew安装完boost后其根目录在/usr/local/Cellar/boost,头文件 ...

  4. Windows下编译和安装Boost库

    因为boost都是使用模板的技术,所以所有代码都是写在一个.hpp头文件中.这样boost中的大部分内容是不需要编译生成相应的链接库,只需要设置下面的包含目录(或者设置一下环境变量),在源文件中包含相 ...

  5. 转:VC9(VC2008.net) 编译安装 boost 1.39 库

    简介 Boost库是一个经过千锤百炼.可移植.提供源代码的C++库,,作为标准库的后备,是C++ 标准化进程的发动机之一. Boost库由C++标准委员会库工作组成员发起,其中有些内容有望成为下一代C ...

  6. linux之安装boost环境

    1  下载最新的boost代码包 网址www.boost.org,如果觉得网速很慢,你可以直接在别人的csdn那里去下载 地址:https://download.csdn.net/download/w ...

  7. 手动安装boost库

    手动安装boost库. 1,下载boost库,解压到目录.我解压的目录为D:\thirdParty. 2,build bjam工具. 转到 D:\thirdParty\boost_1_37_0\too ...

  8. 完全编译安装boost

    文章目录 1. 安装依赖 2. 编译安装 boost 3. 环境变量配置 boost是C++世界中相当优秀的第三方库,被选入STL的也有不少,其中用到的C++奇技淫巧更是数不胜数. 安装依赖 boos ...

  9. [转载]vs2008下安装boost

    vs2008下安装boost 1.下载boost_1_34_1压缩文件,解压缩到d:\boost_1_34_1\目录下 2.编译bjam 从vs2008的工具菜单进入命令提示窗口"Visua ...

最新文章

  1. 2.STM32中对Key_GPIO_Config()函数的理解(自定义)之轮询控制按键LED
  2. MFC的类层次结构图
  3. 【温故知新】CSS学习笔记(盒子边框介绍)
  4. boost::geometry::wkt用法的测试程序
  5. iOS iCloud云存储数据
  6. JVM 内存示意图(内存结构图/内存解析图)
  7. 第六篇:视图、触发器、事务、存储过程、函数
  8. Java 数据库连接池的技术选型都应考虑哪些要素
  9. 计算机关机键 自动重启,电脑按了关机键后电脑又自动重启了,怎么处理 啊
  10. Makefile:宏定义EXTRA_CFLAGS += -D 与CONFIG_ =y
  11. 医用计算机应用基础与实训教程,计算机应用基础与实训教程第1章..ppt
  12. 使用Popup窗口创建无限级Web页菜单(4)
  13. python 常用模块列表
  14. WPS Linux版的公式自动编号且右对齐的方法
  15. web开发html如何把图片居中,css中怎么让img图片居中
  16. AM信号的调制与解调
  17. Chrome 优化指南
  18. 超出部分隐藏以省略号表示
  19. 在局域网内主动封堵BT下载使用
  20. 会话支持软件行业调研报告 - 市场现状分析与发展前景预测(2021-2027年)

热门文章

  1. 公司局域网IP地址管理方案
  2. mysql pt监控_percona-toolkit对MySQL的复制和监控类操作教程
  3. 使用Rabbitmq搭建MQTT 代理服务器(broker)
  4. 3.3 Matplotlib Contours 等高线图
  5. CG-CTF re部分wp
  6. 使用 HD Tune专业版5.50硬盘/固态硬盘使用程序将缩水的u盘恢复至原来的大小
  7. SMT钢网制作工艺介绍!
  8. 智慧眼:人机共智,跟Chat GPT聊聊数字健康
  9. 爬取网易云音乐播放量大于1000万的爬虫代码
  10. webSerivce简明使用教程