Clion doesn't compile on my MacOS Sierra

已回答

I saw a previous post and the solution is to instal x-code. I tried that and still saw no fix. 

 

The following is the error log.

/Applications/CLion.app/Contents/bin/cmake/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /Users/YangGuoxing/CLionProjects/AB
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /Applications/CLion.app/Contents/bin/cmake/share/cmake-3.6/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "/usr/bin/cc" is not able to compile a simple test program.

It fails with the following output:

Change Dir: /Users/YangGuoxing/CLionProjects/AB/cmake-build-debug/CMakeFiles/CMakeTmp

 

Run Build Command:"/usr/bin/make" "cmTC_40a73/fast"

xcrun: error: invalid active developer path
(/Library/Developer/CommandLineTools), missing xcrun at:
/Library/Developer/CommandLineTools/usr/bin/xcrun

 

 

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!
See also "/Users/YangGuoxing/CLionProjects/AB/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "/Users/YangGuoxing/CLionProjects/AB/cmake-build-debug/CMakeFiles/CMakeError.log".

0

Please open the Terminal, and run the following command:

xcode-select --install

2

请先登录再写评论。