gpt4 book ai didi

c++ - 更新到 Mojave 后出现 cmath 错误

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:47:03 25 4
gpt4 key购买 nike

我昨天更新到 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;
~~^

完整消息位于 pastebin .

文件 test.cpp 只是打印 Hello world,我正在使用命令“make test”来运行它。

注意:我确实知道网上有类似问题的帖子,但我无法理解它们,并认为它们过于特定于 OP。

最佳答案

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

删除/移除 XCode。

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

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

关于c++ - 更新到 Mojave 后出现 cmath 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53064248/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com