如何在 Xcode 中使用 boost::multiprecision::float128

How to use boost::multiprecision::float128 in with Xcode

我正在尝试在 xCode 项目中使用 boost::multiprecision::float128。

我的编译器版本是 Apple clang 版本 11.0.0 (clang-1100.0.20.17) 目标:x86_64-apple-darwin18.7.0 线程模型:posix

我正在使用 boost.1.71.0

我遇到以下编译错误

'quadmath.h' file not found

在float128.hpp

extern "C" {
#include <quadmath.h>
}

我看到了几个关于这个问题的帖子

因为我发现的讨论主题已经有几年了

遗憾的是,它仍然不受支持。 "vanilla clang" 比 Apple clang 更有希望,但仍有许多工作要做,以确保所有部分都到位。

接下来要解决的问题是 here, and work has been done 让它使用 clang >=8 进行编译。但是 Apple Clang 还是不行

作为解决方法,您可以使用 boost::multiprecision::cpp_bin_float_quad.