【发布时间】:2019-04-03 11:47:53
【问题描述】:
我昨天更新到 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。
【问题讨论】:
-
能否将您的 test.cpp 的最小版本添加到您的问题中?
-
编辑时无法添加代码,代码如下:pastebin.com/UEA8Axtn
-
#include <bits/stdc++>不是标准 C++。你甚至从哪里得到标题?它不是我的 Mojave 安装的一部分。 -
其实我已经试过了(垃圾箱里还有xcode应用但是我无法删除),有没有其他方法可以彻底删除?
-
我有个朋友帮我修好了,问题出在我机器上的一些 g++ 编译器别名。