Getting cmath errors after updating to Mojave

Viewed 1456

I updated to Mojave yesterday and haven't been able to compile c++ files since then. I am getting the following message :

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;
      ~~^

The full message is here at pastebin.

The file test.cpp just prints Hello world and I am using the command "make test" to run it.

Note: I do know of threads about similar problems on the net but I am not able to understand them and think that they are too OP-specific.

1 Answers

I have had this issue, and researched it quite a bit past couple of weeks. I have found a temporary solution which is different from what is mentioned in the comments.

Delete/Remove XCode.

Unfortunately for me this is not a great solution since it's my IDE for C++. However I can't seem to solve it any other way at the moment.

Solution also mentioned here: https://github.com/PointCloudLibrary/pcl/issues/2601

Related