Missing headers after an OSX Update? Try this!

I recently opened my Macbook to start working on a few personal projects, and suddenly I noticed that all of my projects were failing to compile. I was pretty surprised - I'm not one to leave my master branch in a broken state!

I finally paid attention to the problem the compiler was complaining about: all of the system headers were missing! Sure enough, I went searching the filesystem and found that the compiler wasn't crazy and that the files had been removed. After some investigation, I discovered that my Macbook had auto-updated OSX and Xcode the previous night. Aha!

If you ever end up in a situation where you suddenly discover that your system headers are missing, try reinstalling the Xcode command line tools:

xcode-select --install

Once everything has been reinstalled, your software should start building again!

(The ultimate question still remains: why the hell do they delete my headers during an update?!)