首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >尝试使用JetBrains CLion,但在cygwin安装后Cmake - c++编译器损坏

尝试使用JetBrains CLion,但在cygwin安装后Cmake - c++编译器损坏
EN

Stack Overflow用户
提问于 2016-12-28 06:47:25
回答 0查看 2.2K关注 0票数 1

我一直在尝试让JetBrains CLion集成开发环境正常工作,但我遇到了Cmake的问题,而且我的在线研究都没有帮助。我安装了cygwin和必要的软件包(如上所述,here - gcc/g++,cmake,make,gdb)。当我打开CLion并进入Build>Toolchains>Debugger下的设置(我正在运行Windows10)时,所有的东西都有一个复选标记,所以看起来CLion已经发现一切正常,但当我查看调试器窗口时,我得到了以下错误:

代码语言:javascript
复制
    "C:\Users\Lucas Lofaro\.CLion2016.3\system\cygwin_cmake\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" "/cygdrive/c/Users/Lucas Lofaro/ClionProjects/cracking_the_coding_interview"
    -- The CXX compiler identification is GNU 5.3.0
    -- Check for working CXX compiler: /usr/bin/c++.exe
    -- Check for working CXX compiler: /usr/bin/c++.exe -- broken
    CMake Error at /cygdrive/c/Users/Lucas Lofaro/.CLion2016.3/system/cygwin_cmake/share/cmake-3.6.2/Modules/CMakeTestCXXCompiler.cmake:54 (message):
      The C++ compiler "/usr/bin/c++.exe" is not able to compile a simple test
      program.

      It fails with the following output:

       Change Dir: /cygdrive/c/Users/Lucas Lofaro/ClionProjects/cracking_the_coding_interview/cmake-build-debug/CMakeFiles/CMakeTmp



      Run Build Command:"/usr/bin/make.exe" "cmTC_96921/fast"

      /usr/bin/make -f CMakeFiles/cmTC_96921.dir/build.make
      CMakeFiles/cmTC_96921.dir/build

      make[1]: Entering directory '/cygdrive/c/Users/Lucas
      Lofaro/ClionProjects/cracking_the_coding_interview/cmake-build-debug/CMakeFiles/CMakeTmp'


      Building CXX object CMakeFiles/cmTC_96921.dir/testCXXCompiler.cxx.o

      /usr/bin/c++.exe -o CMakeFiles/cmTC_96921.dir/testCXXCompiler.cxx.o -c
      "/cygdrive/c/Users/Lucas
      Lofaro/ClionProjects/cracking_the_coding_interview/cmake-build-debug/CMakeFiles/CMakeTmp/testCXXCompiler.cxx"


      Linking CXX executable cmTC_96921.exe

      "/cygdrive/c/Users/Lucas
      Lofaro/.CLion2016.3/system/cygwin_cmake/bin/cmake.exe" -E cmake_link_script
      CMakeFiles/cmTC_96921.dir/link.txt --verbose=1

      /usr/bin/c++.exe -Wl,--enable-auto-import
      CMakeFiles/cmTC_96921.dir/testCXXCompiler.cxx.o -o cmTC_96921.exe
      -Wl,--out-implib,libcmTC_96921.dll.a
      -Wl,--major-image-version,0,--minor-image-version,0

      c++: fatal error: -fuse-linker-plugin, but cyglto_plugin.dll not found

      compilation terminated.

      CMakeFiles/cmTC_96921.dir/build.make:97: recipe for target 'cmTC_96921.exe'
      failed

      make[1]: *** [cmTC_96921.exe] Error 1

      make[1]: Leaving directory '/cygdrive/c/Users/Lucas
      Lofaro/ClionProjects/cracking_the_coding_interview/cmake-build-debug/CMakeFiles/CMakeTmp'


      Makefile:126: recipe for target 'cmTC_96921/fast' failed

      make: *** [cmTC_96921/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/Users/Lucas Lofaro/ClionProjects/cracking_the_coding_interview/cmake-build-debug/CMakeFiles/CMakeOutput.log".
    See also "/cygdrive/c/Users/Lucas Lofaro/ClionProjects/cracking_the_coding_interview/cmake-build-debug/CMakeFiles/CMakeError.log".

我还将cygwin bin目录添加到了我的Path环境变量中,但是我真的不知道下一步该做什么。有些东西没有连接起来,我不想在没有更好地理解发生了什么的情况下开始深入研究Cmake文件。任何指导都将不胜感激。如果我能提供任何其他信息,请告诉我。

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41353146

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档