CMake error no CMAKE_C_COMPILER could be found using Xcode and GLFW CMake error no CMAKE_C_COMPILER could be found using Xcode and GLFW xcode xcode

CMake error no CMAKE_C_COMPILER could be found using Xcode and GLFW


If you have installed Xcode or Command Line Tools for Xcode, try this:

sudo xcode-select --reset


This happened to me with Xcode10 / Cmake 3.12 after installing Homebrew. Running sudo xcode-select --reset fixed it for me.


Did you install Xcode and Xcode Commandline Tools?

xcode-select --install

If you have Xcode Commandline Tools installed, you should no longer be receiving the xcrun is missing error.

How did you install Cmake? Once you have ensured that Xcode Commandline Tools is installed, please completely remove Cmake from your system and reinstall it. You have a screwed up configuration. There are ways to debug and fix it without a clean install, but since you are new to this, it will be the easiest and lest frustrating way.

Failing that if you do have Xcode Commandline Tools installed, hstdt suggested trying this:

sudo xcode-select --reset