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 rec
The problem is that Xcode, especially Xcode 10.x, has not installed everything, so ensure the command line tools are installed, type this in a terminal shell:
xcode-select --install
also start Xcode and ensure all the required installation is installed ( you should get prompted if it is not.) and since Xcode 10 does not install the full Mac OS SDK, run the installer at
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
as this package is not installed by Xcode 10.