如何在Xcode中使用boost :: multiprecision :: float128 [英] How to use boost::multiprecision::float128 in with Xcode

查看:47
本文介绍了如何在Xcode中使用boost :: multiprecision :: float128的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am trying to use boost::multiprecision::float128 in xCode project.

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

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

我正在使用boost.1.71.0

I am using boost.1.71.0

我正在遵循编译错误

找不到

'quadmath.h'文件

'quadmath.h' file not found

在float128.hpp

in float128.hpp

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

关于这个问题,我看到了几个话题

I saw several threads regarding to this issue

19个月前,由John Maddock撰写(lang语不支持float128和libquadmath,所以您很不走运:该标头仅受gcc和Intel编译器支持.)

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

    • 所以我仍然不能在xCode项目中使用boost :: multiprecision :: float128吗?
    • 在boost设置过程中可能丢失了一些东西,它具有lib文件夹,并且在boost设置过程中丢失了某些东西吗?
    • 使用当前的编译器版本是否可以解决此问题?

    推荐答案

    遗憾的是,它仍然不受支持.与苹果公司相比,香草罐"有更多希望,但仍然有很多工作要做,以确保所有零件都准备就绪.

    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.

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

    As a workaround, you can use boost::multiprecision::cpp_bin_float_quad.

    这篇关于如何在Xcode中使用boost :: multiprecision :: float128的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆