Cannot find stdio.h

Try setting SDKROOT explicitly to the system SDK:

export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)

Doing it avoids the need for creating symlinks in /usr.

This error seem recurrent, for example, if you installed another compiler (e.g. gcc from brew). Setting SDKROOT became so common that it might be a good idea to add it to ~/.bash_profile.

Leave a Comment