c++ - W10 + Clion,设置错误

标签 c++ linux windows clion

我正在尝试在我的电脑上设置 Clion。我尝试了 Clion 和 mingw,当我指向工具链位置时,出现了相同的错误。我按照说明安装和卸载了所有必需的软件包,但无法使其正常工作。

还有其他人遇到过此设置问题吗?

这是我收到的错误:

Error: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/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/__default__/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make.exe" "cmTC_4ce80/fast"
/usr/bin/make -f CMakeFiles/cmTC_4ce80.dir/build.make CMakeFiles/cmTC_4ce80.dir/build
make[1]: Entering directory '/cygdrive/c/Users/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/__default__/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_4ce80.dir/testCXXCompiler.cxx.o
/usr/bin/c++.exe -o CMakeFiles/cmTC_4ce80.dir/testCXXCompiler.cxx.o -c /cygdrive/c/Users/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/__default__/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_4ce80.exe
/cygdrive/c/Users/satin/.CLion2016.2/system/cygwin_cmake/bin/cmake.exe -E cmake_link_script CMakeFiles/cmTC_4ce80.dir/link.txt --verbose=1
/usr/bin/c++.exe -Wl,--enable-auto-import CMakeFiles/cmTC_4ce80.dir/testCXXCompiler.cxx.o -o cmTC_4ce80.exe -Wl,--out-implib,libcmTC_4ce80.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.
make[1]: *** [CMakeFiles/cmTC_4ce80.dir/build.make:98: cmTC_4ce80.exe] Error 1
make[1]: Leaving directory '/cygdrive/c/Users/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/__default__/CMakeFiles/CMakeTmp'
make: *** [Makefile:126: cmTC_4ce80/fast] Error 2
CMake will not be able to correctly generate this project.
Error:Configuration Debug
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/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/Debug/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make.exe" "cmTC_4526e/fast"
/usr/bin/make -f CMakeFiles/cmTC_4526e.dir/build.make CMakeFiles/cmTC_4526e.dir/build
make[1]: Entering directory '/cygdrive/c/Users/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/Debug/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_4526e.dir/testCXXCompiler.cxx.o
/usr/bin/c++.exe -o CMakeFiles/cmTC_4526e.dir/testCXXCompiler.cxx.o -c /cygdrive/c/Users/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/Debug/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_4526e.exe
/cygdrive/c/Users/satin/.CLion2016.2/system/cygwin_cmake/bin/cmake.exe -E cmake_link_script CMakeFiles/cmTC_4526e.dir/link.txt --verbose=1
/usr/bin/c++.exe -Wl,--enable-auto-import CMakeFiles/cmTC_4526e.dir/testCXXCompiler.cxx.o -o cmTC_4526e.exe -Wl,--out-implib,libcmTC_4526e.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.
make[1]: *** [CMakeFiles/cmTC_4526e.dir/build.make:98: cmTC_4526e.exe] Error 1
make[1]: Leaving directory '/cygdrive/c/Users/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/Debug/CMakeFiles/CMakeTmp'
make: *** [Makefile:126: cmTC_4526e/fast] Error 2
CMake will not be able to correctly generate this project.
Error:Configuration Release
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/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/Release/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make.exe" "cmTC_0c461/fast"
/usr/bin/make -f CMakeFiles/cmTC_0c461.dir/build.make CMakeFiles/cmTC_0c461.dir/build
make[1]: Entering directory '/cygdrive/c/Users/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/Release/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_0c461.dir/testCXXCompiler.cxx.o
/usr/bin/c++.exe -o CMakeFiles/cmTC_0c461.dir/testCXXCompiler.cxx.o -c /cygdrive/c/Users/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/Release/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_0c461.exe
/cygdrive/c/Users/satin/.CLion2016.2/system/cygwin_cmake/bin/cmake.exe -E cmake_link_script CMakeFiles/cmTC_0c461.dir/link.txt --verbose=1
/usr/bin/c++.exe -Wl,--enable-auto-import CMakeFiles/cmTC_0c461.dir/testCXXCompiler.cxx.o -o cmTC_0c461.exe -Wl,--out-implib,libcmTC_0c461.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.
make[1]: *** [CMakeFiles/cmTC_0c461.dir/build.make:98: cmTC_0c461.exe] Error 1
make[1]: Leaving directory '/cygdrive/c/Users/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/Release/CMakeFiles/CMakeTmp'
make: *** [Makefile:126: cmTC_0c461/fast] Error 2
CMake will not be able to correctly generate this project.
Error:Configuration RelWithDebInfo
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/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/RelWithDebInfo/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make.exe" "cmTC_0238e/fast"
/usr/bin/make -f CMakeFiles/cmTC_0238e.dir/build.make CMakeFiles/cmTC_0238e.dir/build
make[1]: Entering directory '/cygdrive/c/Users/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/RelWithDebInfo/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_0238e.dir/testCXXCompiler.cxx.o
/usr/bin/c++.exe -o CMakeFiles/cmTC_0238e.dir/testCXXCompiler.cxx.o -c /cygdrive/c/Users/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/RelWithDebInfo/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_0238e.exe
/cygdrive/c/Users/satin/.CLion2016.2/system/cygwin_cmake/bin/cmake.exe -E cmake_link_script CMakeFiles/cmTC_0238e.dir/link.txt --verbose=1
/usr/bin/c++.exe -Wl,--enable-auto-import CMakeFiles/cmTC_0238e.dir/testCXXCompiler.cxx.o -o cmTC_0238e.exe -Wl,--out-implib,libcmTC_0238e.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.
make[1]: *** [CMakeFiles/cmTC_0238e.dir/build.make:98: cmTC_0238e.exe] Error 1
make[1]: Leaving directory '/cygdrive/c/Users/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/RelWithDebInfo/CMakeFiles/CMakeTmp'
make: *** [Makefile:126: cmTC_0238e/fast] Error 2
CMake will not be able to correctly generate this project.
Error:Configuration MinSizeRel
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/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/MinSizeRel/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make.exe" "cmTC_7f6fc/fast"
/usr/bin/make -f CMakeFiles/cmTC_7f6fc.dir/build.make CMakeFiles/cmTC_7f6fc.dir/build
make[1]: Entering directory '/cygdrive/c/Users/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/MinSizeRel/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_7f6fc.dir/testCXXCompiler.cxx.o
/usr/bin/c++.exe -o CMakeFiles/cmTC_7f6fc.dir/testCXXCompiler.cxx.o -c /cygdrive/c/Users/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/MinSizeRel/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_7f6fc.exe
/cygdrive/c/Users/satin/.CLion2016.2/system/cygwin_cmake/bin/cmake.exe -E cmake_link_script CMakeFiles/cmTC_7f6fc.dir/link.txt --verbose=1
/usr/bin/c++.exe -Wl,--enable-auto-import CMakeFiles/cmTC_7f6fc.dir/testCXXCompiler.cxx.o -o cmTC_7f6fc.exe -Wl,--out-implib,libcmTC_7f6fc.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.
make[1]: *** [CMakeFiles/cmTC_7f6fc.dir/build.make:98: cmTC_7f6fc.exe] Error 1
make[1]: Leaving directory '/cygdrive/c/Users/satin/.CLion2016.2/system/cmake/generated/untitled-9502414e/9502414e/MinSizeRel/CMakeFiles/CMakeTmp'
make: *** [Makefile:126: cmTC_7f6fc/fast] Error 2
CMake will not be able to correctly generate this project.

最佳答案

Cygwin 的 C++ 编译器(或者可能是链接器)无法找到 cyglto_plugin.dll,它可能是多个 Cygwin packages 的一部分。 。我不确定 Clion 是如何工作的 - 是否需要安装 Cygwin 或者将其带入自己的安装程序中。如果它要求用户安装 Cygwin - 验证您是否已安装适当的软件包并且提到的 DLL 已就位。

关于c++ - W10 + Clion,设置错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39280306/

相关文章:

windows - 为什么 Visual Studio Build Tools 安装程序会立即返回而不安装任何东西?

windows - 在 Audacity 中的多个轨道上移动多个剪辑

c++ - 获取对 unordered_map operator[] 返回值的引用

c++ - 静态矩阵转换为指针

c++ - 将项目文件夹(lua)嵌入到exe中

python - access(2) vs stat(2) 检查文件是否可执行

linux - 我怎样才能从 linux 的基本行中获取特定的单词

c++ - 让我的 GTK 应用程序在 Linux 上启动时启动

linux - 在 Proxmox 2.x 上创建 VM 时传递 kickstart 参数

windows - VLC 无法使用 Dokan 播放视频