0
我使用的克利翁試圖建立一個C/C++環境,但CMake的不能編譯測試程序:的Windows CMake的不能編譯,測試程序
C:\Users\corey\.CLion2016.3\system\cygwin_cmake\bin\cmake.exe -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /cygdrive/c/Users/corey/ClionProjects/demo
-- The C compiler identification is MSVC 18.0.31101.0
-- The CXX compiler identification is MSVC 18.0.31101.0
-- Check for working C compiler: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
-- Check for working C compiler: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- broken
CMake Error at /cygdrive/c/Users/corey/.CLion2016.3/system/cygwin_cmake/share/cmake-3.6.2/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "/cygdrive/c/Program Files (x86)/Microsoft Visual Studio
12.0/VC/bin/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /cygdrive/c/Users/corey/ClionProjects/demo/cmake-build-debug/CMakeFiles/CMakeTmp
Run Build Command:"/cygdrive/c/D/dmd2/windows/bin/make.exe"
"cmTC_2a8fc/fast"
f CMakeFiles/cmTC_2a8fc.dir/build.make CMakeFiles/cmTC_2a8fc.dir/build
Error: 'f' not found
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 "/cygdrive/c/Users/corey/ClionProjects/demo/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "/cygdrive/c/Users/corey/ClionProjects/demo/cmake-build-debug/CMakeFiles/CMakeError.log".
我運行Windows 10和VC 12.0(Visual Studio 2013?)。我已經嘗試設置CLion來使用cygwin cmake而不是內置版本,並且我嘗試重新安裝所有相關工具,但沒有成功。
MSVC裏面的cygwin?你確定? – arrowd
CLion使用cmake和cygwin或mingw,然後cmake默認使用VC。 – coreyschram
它看起來像切換到使用cygwin的GCC而不是VC沒有區別,同樣的錯誤發生。 – coreyschram