Reputation: 63
I instaled CLion as well as the Xcode command line tool but I still can't compile the simple "Hello, World!" code. How can I fix this? This is the error I'm getting:
/Applications/CLion.app/Contents/bin/cmake/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /Users/JoshGarza/CLionProjects/untitled -- 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.7/Modules/CMakeTestCCompiler.cmake:51 (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/JoshGarza/CLionProjects/untitled/cmake-build-debug/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_1b703/fast"
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
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/JoshGarza/CLionProjects/untitled/cmake-build-debug/CMakeFiles/CMakeOutput.log". See also "/Users/JoshGarza/CLionProjects/untitled/cmake-build-debug/CMakeFiles/CMakeError.log".
[Previous CMake output restored: 4/2/17, 6:42 PM]
Upvotes: 2
Views: 8444
Reputation: 81
I actually encounterd the same issue but not exactly as yours. What i did was that i changed the cmake that was on ninja the typical usr/bin/make in the toolchain settings.
as you can see in this picture, the build tool is on ninja which you have to change to usr/bin/make as shown in the next picture. Hope it works :)
Upvotes: 0
Reputation: 2781
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
This error means that you have not installed the command line tools that are necessary to run code on CLion.
If you are using OS X 10.11 El Capitan, OS X 10.10 Yosemite, and OS X 10.9 and newer, then follow these steps to get the command line tools (CDT) without re-installing XCode again:
- Open a Terminal window.
- Type
xcode-select --install
- A dialog will appear telling you that it requires the command line developer tools, and asks if you would like to install them. Click on the "Install" button.
If you have an older than the mentioned versions, then vist this site:
Upvotes: 3