CLion and clang on windows
Hello:
I have CLion 2016.3.3 set up on Windows using MinGW-W64. Everything is working correctly, but the problem comes when I try to switch to clang. I am using the prebuilt clang 3.9.1 binary from http://releases.llvm.org/download.html, and I have told CLion to use clang by setting the following CMake options:
-D CMAKE_C_COMPILER=clang.exe -D CMAKE_CXX_COMPILER=clang++.exe
Then, CMake fails with:
"C:\Program Files (x86)\JetBrains\CLion 2016.3.2\bin\cmake\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -D CMAKE_C_COMPILER=clang.exe -D CMAKE_CXX_COMPILER=clang++.exe -G "CodeBlocks - MinGW Makefiles" T:\Development\testingClion
-- The C compiler identification is Clang 3.9.1
-- The CXX compiler identification is Clang 3.9.1
-- Check for working C compiler: T:/Aplicaciones/LLVM/bin/clang.exe
-- Check for working C compiler: T:/Aplicaciones/LLVM/bin/clang.exe -- broken
CMake Error at C:/Program Files (x86)/JetBrains/CLion 2016.3.2/bin/cmake/share/cmake-3.6/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "T:/Aplicaciones/LLVM/bin/clang.exe" is not able to compile
a simple test program.
It fails with the following output:
I have seen other posts with related problems such as (https://intellij-support.jetbrains.com/hc/en-us/community/posts/206606735-Using-Clang-With-CLion-on-Windows?input_string=CLion%20and%20clang%20on%20windows), but they do not offer a solution to the problem.
What steps do I need to follow to solve this issue?
Please sign in to leave a comment.
Hi! Please take a look at this comment in the similar topic.