2017-02-10 11 views
0

我下载了clion,并通过jetbeans提供的设置指南:https://www.jetbrains.com/help/clion/2016.3/quick-tutorial-on-configuring-clion-on-windows.html 我尝试设置cygwin和minGW作为环境,但程序无法运行。我跟着这个问题:How to setup Clion for compile and RUN无法运行clion中的任何程序

我已经附加的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.c.o 

    /cygdrive/c/MinGW/bin/gcc.exe -o 
    CMakeFiles/cmTC_2284f.dir/testCCompiler.c.o -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.c.o] 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] 
+2

请参阅[问]。当提问者提问时,问答网站效果最佳。如果你错过了,你甚至从来没有问过一个问题。 – IInspectable

+0

@IInspectable对不起,我只是想在克利翁运行的程序。请帮忙。 – ShubhamS

回答

1

下载克利翁产品时,我也面临着一些问题,因为它没有工作对我来说很多次。但是,我随后发现这个视频:

Install & Configure CLion Student Copy|| best IDE for C/C++

我所做的是我卸载克利翁MinGW的,我从头开始再次。这可能不是最好的选择,但我无法确定手头的问题,所以我通过上述视频重新安装了它。 CLION现在为我工作。该视频用于在Windows操作计算机上安装CLion。

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


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

+0

非常感谢。有效。很少包装没有安装,我看了视频后,它的工作。我安装了minGW,但它不断提出这些错误,所以我安装了cygwin,看看是否有效。 – ShubhamS