不能运行任何程序

我下载了clion,并通过jetbeans提供的设置指南: https ://www.jetbrains.com/help/clion/2016.3/quick-tutorial-on-configuring-clion-on-windows.html我试图设置cygwin和minGW作为环境,但程序不会运行。 我跟着这个问题: 如何设置编译和运行的Clion

我已经在path中追加了cygwin和minGW的目录,但是仍然无法运行我的程序。

这引起了一个长期的错误,

CMake Error at /cygdrive/c/Users/dell/.CLion2016.3/system/cygwin_cmake/share/cmake-3.6.3/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "/cygdrive/c/MinGW/bin/gcc.exe" is not able to compile a simple test program. 

它失败,输出如下:

  Change Dir: /cygdrive/c/Users/dell/Desktop/jetBeans/c_c++/cmake-build-debug/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/make.exe" "cmTC_2284f/fast" /usr/bin/make -f CMakeFiles/cmTC_2284f.dir/build.make CMakeFiles/cmTC_2284f.dir/build make[1]: Entering directory '/cygdrive/c/Users/dell/Desktop/jetBeans/c_c++/cmake-build-debug/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_2284f.dir/testCCompiler.co /cygdrive/c/MinGW/bin/gcc.exe -o CMakeFiles/cmTC_2284f.dir/testCCompiler.co -c /cygdrive/c/Users/dell/Desktop/jetBeans/c_c++/cmake-build-debug/CMakeFiles/CMakeTmp/testCCompiler.c gcc.exe: error: /cygdrive/c/Users/dell/Desktop/jetBeans/c_c++/cmake-build-debug/CMakeFiles/CMakeTmp/testCCompiler.c: No such file or directory gcc.exe: fatal error: no input files compilation terminated. make[1]: *** [CMakeFiles/cmTC_2284f.dir/build.make:66: CMakeFiles/cmTC_2284f.dir/testCCompiler.co] Error 1 make[1]: Leaving directory '/cygdrive/c/Users/dell/Desktop/jetBeans/c_c++/cmake-build-debug/CMakeFiles/CMakeTmp' make: *** [Makefile:126: cmTC_2284f/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/dell/Desktop/jetBeans/c_c++/cmake-build-debug/CMakeFiles/CMakeOutput.log". See also "/cygdrive/c/Users/dell/Desktop/jetBeans/c_c++/cmake-build-debug/CMakeFiles/CMakeError.log". [Previous CMake output restored: 11-02-2017 04:45] 

我在下载CLion产品时也遇到了一些问题,因为它在很多时候都不适合我。 不过,我发现这个视频:

安装和配置CLion Student Copy || 最适合C / C ++的IDE 。

我所做的是卸载了CLion MinGW,我又从头开始了。 这可能不是最好的选择,但我不能指出手头的问题,所以我按照上面的视频重新安装。 CLION现在为我工作。 该视频用于在Windows操作计算机上安装CLion。

只是一个建议,你可以先看视频,看看你是否犯了错误。 比较视频中的讲师如何做到这一点。 如果您错过了导入某个包的视频(本视频使用MinGW),那么这就是您错误的地方。 这也可以解决这个问题。 如果您无法确定错误,请尝试重新安装。 祝你好运!


编辑:你为什么要安装MinGW和cygwin? 你只需要其中的一个。