Before updating to Mojave I was compiling C programs just fine. I used an older version of gcc, 7.3, that I installed using the instructions found here.
Then I updated t
I figured out how to fix it. I went to
/Library/Developer/CommandLineTools/Packages/
then opened and installed macOS_SDK_headers_for_macOS_10.14.pkg.