使用 Xcode 在 Mac 上构建 Boost

2021-12-24 00:00:00 macos build c++ xcode boost

我最近熟悉了 Boost 库,我想在我的 Xcode 项目中使用它.但遗憾的是,没有关于如何做到这一点的 HowTo 或 FAQ :(

I've recently got acquainted with Boost library and I'd like to use it in my Xcode project. But sadly there is no HowTo or FAQ on how to do it :(

在 Xcode 中构建和使用 Boost 库的操作顺序是什么?

What's the sequence of actions to build and use Boost libraries in Xcode?

推荐答案

我发现最简单的方法是安装 MacPorts,然后您可以通过一个命令安装/构建 Boost:

The easiest way I've found to do it is to install MacPorts, then you can install/build Boost via a single command:

sudo port install boost

此外,您还可以访问其他开源软件.我发现的唯一缺点是,与任何其他包管理系统一样,它们并不总是与最新版本保持同步.

Plus you get similar access to other open source software. The only downside I've found is that, like any other package management system, they are not always up to date with the latest version.

如果你更喜欢 Homebrew 作为你的包管理器,命令是:

If you prefer Homebrew as your package manager, the command is:

brew install boost

相关文章