Catalina C++: Using headers yield error: no member named 'signbit' in the global namespace

前端 未结 11 939
不思量自难忘°
不思量自难忘° 2020-11-30 06:36

After upgrading to Catalina from Mojave, Setuping: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk in the env.

I\

11条回答
  •  鱼传尺愫
    2020-11-30 07:14

    I have just got this error when trying to compile gRPC after recently upgrading to 10.15.4 and Xcode 11.4 and I started to look at all the solutions offered (here and Can't compile a C program on a Mac after upgrading to Catalina 10.15), and tried a few of them (though not trying to recreate /usr/include as that would violate the separation that Apple were trying to create) - nothing seemed to work.

    I then looked closely at the actual complier invocations that the make process was producing and noticed that there was an explicit

    -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include
    

    that was ultimately causing the includes to happen in the wrong order - removing this explicit include path allowed the compilation to succeed with a default install of catalina, Xcode and the Xcode command-line tools, as you would expect, no other tricks/compiler flags needed.

提交回复
热议问题