繁体   English   中英

检查可运行的CXX编译器:/ cygdrive / c / cygwin64 / bin / clang ++-损坏

[英]Check for working CXX compiler: /cygdrive/c/cygwin64/bin/clang++ — broken

我正在尝试安装CLion并使我的编译器正常工作,但是无论我做什么,都会不断出现上述错误。 它能够检测clang很好,但不能检测c ++++。 这是什么原因呢?

完整错误如下所示:

Check for working CXX compiler: /cygdrive/c/cygwin64/bin/clang++ -- broken
CMake Error at /cygdrive/c/.CLion2018.1/system/cygwin_cmake/share/cmake-3.10.3/Modules/CMakeTestCXXCompiler.cmake:45 (message):
  The C++ compiler

    "/cygdrive/c/cygwin64/bin/clang++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /cygdrive/c/CLionProjects/trivialtest/cmake-build-debug/CMakeFiles/CMakeTmp

    Run Build Command:"/usr/bin/make.exe" "cmTC_79d96/fast"
    /usr/bin/make -f CMakeFiles/cmTC_79d96.dir/build.make CMakeFiles/cmTC_79d96.dir/build
    make[1]: Entering directory '/cygdrive/c/CLionProjects/trivialtest/cmake-build-debug/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_79d96.dir/testCXXCompiler.cxx.o
    /cygdrive/c/cygwin64/bin/clang++     -o CMakeFiles/cmTC_79d96.dir/testCXXCompiler.cxx.o -c /cygdrive/c/CLionProjects/trivialtest/cmake-build-debug/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    Linking CXX executable cmTC_79d96.exe
    /cygdrive/c/.CLion2018.1/system/cygwin_cmake/bin/cmake.exe -E cmake_link_script CMakeFiles/cmTC_79d96.dir/link.txt --verbose=1
    /cygdrive/c/cygwin64/bin/clang++    -Wl,--enable-auto-import  CMakeFiles/cmTC_79d96.dir/testCXXCompiler.cxx.o  -o cmTC_79d96.exe -Wl,--out-implib,libcmTC_79d96.dll.a -Wl,--major-image-version,0,--minor-image-version,0 
    /cygdrive/c/cygwin64/bin/ld: cannot find -liconv
    clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
    make[1]: *** [CMakeFiles/cmTC_79d96.dir/build.make:98: cmTC_79d96.exe] Error 1
    make[1]: Leaving directory '/cygdrive/c/CLionProjects/trivialtest/cmake-build-debug/CMakeFiles/CMakeTmp'
    make: *** [Makefile:126: cmTC_79d96/fast] Error 2




  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/CLionProjects/trivialtest/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "/cygdrive/c/CLionProjects/trivialtest/cmake-build-debug/CMakeFiles/CMakeError.log".

这是CMakeError.log:

 Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
 Compiler: /cygdrive/c/cygwin64/bin/clang++ 
 Build flags: 
 Id flags:  

 The output was:
 1
 /cygdrive/c/cygwin64/bin/ld: cannot find -liconv
 clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)

 Determining if the CXX compiler works failed with the following output:
 Change Dir: /cygdrive/c/CLionProjects/trivialtest/cmake-build-debug/CMakeFiles/CMakeTmp

 Run Build Command:"/usr/bin/make.exe" "cmTC_79d96/fast"
 /usr/bin/make -f CMakeFiles/cmTC_79d96.dir/build.make CMakeFiles/cmTC_79d96.dir/build
 make[1]: Entering directory '/cygdrive/c/CLionProjects/trivialtest/cmake-build-debug/CMakeFiles/CMakeTmp'
 Building CXX object CMakeFiles/cmTC_79d96.dir/testCXXCompiler.cxx.o
 /cygdrive/c/cygwin64/bin/clang++     -o CMakeFiles/cmTC_79d96.dir/testCXXCompiler.cxx.o -c /cygdrive/c/CLionProjects/trivialtest/cmake-build-debug/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
 Linking CXX executable cmTC_79d96.exe
 /cygdrive/c/.CLion2018.1/system/cygwin_cmake/bin/cmake.exe -E cmake_link_script CMakeFiles/cmTC_79d96.dir/link.txt --verbose=1
 /cygdrive/c/cygwin64/bin/clang++    -Wl,--enable-auto-import  CMakeFiles/cmTC_79d96.dir/testCXXCompiler.cxx.o  -o cmTC_79d96.exe -Wl,--out-implib,libcmTC_79d96.dll.a -Wl,--major-image-version,0,--minor-image-version,0 
 /cygdrive/c/cygwin64/bin/ld: cannot find -liconv
 clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
 make[1]: *** [CMakeFiles/cmTC_79d96.dir/build.make:98: cmTC_79d96.exe] Error 1
 make[1]: Leaving directory '/cygdrive/c/CLionProjects/trivialtest/cmake-build-debug/CMakeFiles/CMakeTmp'
 make: *** [Makefile:126: cmTC_79d96/fast] Error 2

如果链接器找不到-liconv ,则它正在寻找名为libiconv的库。 您可以尝试在cygwin安装中安装它。

我的猜测是安装此软件包会有所帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM