我已经将系统更新到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
中用/Library/Developer/CommandLineTools/usr/include/c++/v1/math.h
替换了<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
两次。
我还尝试了同一个问题中的其他建议,但都无济于事。有人能帮我解决这个问题吗?
解决方案似乎是保留#include<math.h>
,并在该行之后将#inlude</Library/Developer/CommandLineTools/usr/include/c++/v1/math.h>
放入/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath
文件中。