Home > Mobile >  Build tools broken after uninstalling Xcode
Build tools broken after uninstalling Xcode

Time:04-12

When I use make to build my C project from the command line (cmake .., make) after installing and uninstalling xcode, make outputs make[2]: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c : No such file or directory

xcode-select -p output: /Library/Developer/CommandLineTools

sudo xcode-select --install output: xcode-select: error: command line tools are already installed, use "Software Update" to install updates

xcode-select --reset output: nothing

I uninstalled and reinstalled the xcode command line tools and it still gives the same No such file or directory error

CodePudding user response:

CMake stores the results of its system introspection - the full path to the compiler used is one of them - in a file called CMakeCache.txt. If you change something in your system that invalidates these results you need to clear the cache, i.e. delete the CMakeCache.txt file in the build folder.

  • Related