Missing system headers (<stdio.h>) on macOS Catalina

I recently updated to the last version of MacOS but I can't compile with GCC, it says

fatal error: _stdio.h: No such file or directory #include <_stdio.h>

I tried to reinstall Xcode, commandlinetools, etc etc... but they didn't solve the problem, could you help me?

Regards, Nico

I think there are specific issues with header files under the latest MacOS 'Catalina'. Apple seems to have changed/rearranged some things.

What are you trying to compile? Specifically.

Try to export the CPATH to load the packages

Code Block cmd
export CPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include


This is a misleading error.

Upon reading it, our first reaction is to search for those headers or to define where they are. That's the wrong approach.

You need to set several values version in the Architectures section of Build Settings if you can open the project in Xcode. This is what allowed me to compile Apple's Bonjour DNS-SD project in Xcode.

Base SDK, Architectures. Those were all I needed to update to get the build to function.

Base SDK: macosx Architectures: $(ARCHS_STANDARD) Valid Architectures: i386 x86_64

Missing system headers (&lt;stdio.h&gt;) on macOS Catalina
 
 
Q