【问题标题】:Multiple issues with math.h on macOS catalina after upgrade升级后 macOS catalina 上的 math.h 存在多个问题
【发布时间】:2020-07-23 15:22:18
【问题描述】:

我已将系统更新到 macOS catalina 10.15.6,我遇到了 https://stackoverflow.com/a/61519060/3616359 描述和解决的问题。我遇到了以下问题:

/usr/local/include/boost/math/special_functions/fpclassify.hpp:552:17: error:
no member named 'isnan' in namespace 'std'; did you
mean simply 'isnan'

我只是在/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath 中将<math.h> 替换为/Library/Developer/CommandLineTools/usr/include/c++/v1/math.h。但是,这会导致另一种类型的问题,例如:

/Library/Developer/CommandLineTools/usr/include/c++/v1/math.h:764:42: error:
  no member named 'fabs' in the global namespace

我编译代码的唯一方法是在make 调用期间修改/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath 两次。

我还尝试了来自同一个发布问题的其他建议,但没有帮助。 谁能帮忙解决这个问题?

【问题讨论】:

    标签: macos macos-catalina cmath


    【解决方案1】:

    解决方案似乎是您保留 #include<math.h> 并在该行之后将 #inlude</Library/Developer/CommandLineTools/usr/include/c++/v1/math.h> 放入 /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath 文件中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-13
      • 2020-02-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-07
      • 2020-04-10
      • 2020-09-19
      相关资源
      最近更新 更多