Boost C++ for iOS and Mac OS X (Intel & Apple Silicon M1) & Catalyst - arm64 / x86_64
支持版本:1.83.0(使用适当的标签来选择版本)
该仓库提供了一个用于在 iOS 和 Mac OS X & Catalyst 应用程序中使用的通用脚本来构建静态 Boost C++ 库。所支持的最新 Boost 版本是从以下地址获取的: https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2
构建库
atomic, chrono, container, context, contract, coroutine, date_time, exception, fiber, filesystem, graph, iostreams, json, locale, log, math, nowide, program_options, random, regex, serialization, stacktrace, system, test, thread, timer, type_erasure, url, wave
不构建库
graph_parallel, mpi, python
前提条件
- 必须安装Xcode,因为使用xcodebuild创建xcframeworks
xcode-select -p
必须指向Xcode应用程序开发者目录(例如,默认情况下为/Applications/Xcode.app/Contents/Developer)。如果它指向CommandLineTools目录,则应执行:sudo xcode-select --reset
或sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
- 您不应在您的home目录中拥有自己的user-config.jam文件!
构建说明
- 使用ICU后端构建“locale”和“regex”库。ICU构建脚本从https://github.com/apotocki/icu4c-iosx取用,并通过“pod”实用程序运行。
- 带有BOOST_TEST_NO_MAIN标志为iOS构建“test”库。
如何构建?
- 手动
# clone the repo
git clone -b 1.83.0 https://github.com/apotocki/boost-iosx
# build libraries
cd boost-iosx
scripts/build.sh
# have fun, the result artifacts will be located in 'frameworks' folder.
# Then you can add desirable xcframewors in your XCode project. The process is described, e.g., at https://www.simpleswiftguide.com/how-to-add-xcframework-to-xcode-project/
- 使用cocoapods。将以下行添加到您项目的Podfile中
use_frameworks!
pod 'boost-iosx', '~> 1.83.0'
# or optionally more precisely e.g.:
# pod 'boost-iosx', :git => 'https://github.com/apotocki/boost-iosx', :tag => '1.83.0.0'
如果您想使用特定的boost库,指定它们,如以下示例中的log和program_options库
pod 'boost-iosx/log', '~> 1.83.0'
pod 'boost-iosx/program_options', '~> 1.83.0'
# note: Some libraries have dependencies on other Boost libraries. In that case, you should explicitly add all their dependencies to your Podfile.
然后安装新的依赖关系
pod install --verbose
作为一则广告...
本项目构建的Boost库已用于App Store上的iOS应用
PotoHEX 十六进制文件查看器与编辑器 | |
此应用程序旨在以字节或字符级别查看和编辑文件。
您可以通过尝试应用来支持我的开源开发。
欢迎提供反馈!