I have used the gcc command on the terminal to compile C programs but all of a sudden, after an update to my Mac's OS (to macOS 10.14 Mojave, and XCode 10.0), I started receiving the message:
test.c:8:10: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^~~~~~~~~
compilation terminated.
I already have gcc installed as I can find it in /usr/local/bin
and there really is a gcc in there. I tried running the same file on my other iMac and it worked without any issue.
I tried running xcode-select --install
and it already was installed, hence it didn't fix the issue I'm having now. I'm guessing that the path is messed up as it doesn't seem like it can find gcc
after I started copying and pasting some commands from other resources to solve this issue.
Would like some help on this.