问题
I am trying to use boost::multiprecision::float128 in xCode project.
My compiler version is Apple clang version 11.0.0 (clang-1100.0.20.17) Target: x86_64-apple-darwin18.7.0 Thread model: posix
I am using boost.1.71.0
I am getting following compile error
'quadmath.h' file not found
in float128.hpp
extern "C" {
#include <quadmath.h>
}
I saw several threads regarding to this issue
https://svn.boost.org/trac10/ticket/8265
19 months ago by John Maddock (clang has no support for float128 and libquadmath, so you're out of luck: that header is supported by gcc and Intel compilers only.)
https://forums.developer.apple.com/thread/44405
As discussion threads I have find are few years old
- so is it still true that I can't use boost::multiprecision::float128 in xCode project ?
- might it be something missing during boost setup, it has lib folder and during boost set up something get lost ?
- Is there any workaround for this problem, with my current compiler version?
回答1:
Sadly, it's still not supported. There is more hope for "vanilla clang", than for Apple clang, but still, there's a lot of work to be done to make sure all the pieces are in place.
The issue to follow is here, and work has been done to get it to compile with clang >=8. But Apple Clang still doesn't work.
As a workaround, you can use boost::multiprecision::cpp_bin_float_quad
.
来源:https://stackoverflow.com/questions/57755032/how-to-use-boostmultiprecisionfloat128-in-with-xcode