I am having this error when I run gcc, cc or clang on my Mac 10.13:
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
I have a feeling this has got to do with the fact that I removed Xcode.app (somewhat crudely by cutting and pasting the .app file and all files that have been pointed by the app Appcleaner to be related to Xcode to an external harddrive) in a desperate effort to save space.
How can I continue using gcc cc or clang without having to install back Xcode? I tried removing the entire CLI tool directory with:
sudo rm -rf /Library/Developer/CommandLineTools
and reinstalled them with:
xcode-select --install
But this is not solving the problem... Please help.