更新到Mojave后获取cmath错误

Sha*_*dra 8 c++ xcode

我昨天更新到Mojave,从那时起就无法编译c ++文件.我收到以下消息:

In file included from test.cpp:4:
In file included from /usr/local/include/bits/stdc++.h:10:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cmath:313:9: error: no member named 'signbit' in the global namespace
using ::signbit;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cmath:314:9: error: no member named 'fpclassify' in the global namespace
using ::fpclassify;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cmath:315:9: error: no member named 'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
      ~~^
Run Code Online (Sandbox Code Playgroud)

完整的消息在这里是pastebin.

文件test.cpp只打印Hello world,我使用命令"make test"来运行它.

注意:我确实知道有关网络上类似问题的线索,但我无法理解它们并认为它们太具有OP特性​​.

And*_*erg 0

我遇到了这个问题,并在过去几周进行了相当多的研究。我找到了一个与评论中提到的不同的临时解决方案。

删除/移除 XCode。

不幸的是,对我来说这不是一个很好的解决方案,因为它是我的 C++ IDE。但目前我似乎无法以任何其他方式解决它。

这里还提到了解决方案:https ://github.com/PointCloudLibrary/pcl/issues/2601