不能在clion中运行任何程序 [英] can't run any program in clion

查看:547
本文介绍了不能在clion中运行任何程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了clion并完成了由jetbeans提供的设置指南: https://www.jetbrains.com/help/clion/2016.3/quick-tutorial-on-configuring-clion-on-windows.html
我尝试设置cygwin和minGW作为环境,但程序无法运行。我跟着这个问题:如何设置编译和运行的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):
C编译器/cygdrive/c/MinGW/bin/gcc.exe无法编译一个
的简单测试程序。

失败,输出如下:

 更改目录:/ cygdrive / c / Users / dell / Desktop / jetBeans / c_c ++ / cmake-build-debug / CMakeFiles / CMakeTmp 



运行构建命令:/ usr / bin / make.execmTC_2284f / fast

/ usr / bin / make -f CMakeFiles / cmTC_2284f.dir / build.make
CMakeFiles / cmTC_2284f.dir / build
$ b $ make [1]:进入目录
'/ cygdrive / c / Users / dell / Desktop / jetBeans / c_c ++ / cmake-build-debug / CMakeFiles / CMakeTmp'


构建C对象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:错误:
/cygdrive/c/Users/dell/Desktop/jetBeans/c_c++/cmake-build-debug/CMakeFiles/CMakeTmp/testCCompiler.c:
没有这样的文件或目录

gc c.exe:致命错误:没有输入文件

编译终止。

make [1]:*** [CMakeFiles / cmTC_2284f.dir / build.make:66:
CMakeFiles / cmTC_2284f.dir / testCCompiler.co]错误1

make [1]:离开目录
'/ cygdrive / c / Users / dell / Desktop / jetBeans / c_c ++ / cmake-build-debug / CMakeFiles / CMakeTmp'


make:*** [Makefile:126:cmTC_2284f / fast]错误2





CMake将无法正确生成这个项目。
调用堆栈(最近调用优先):
CMakeLists.txt:2(项目)


- 配置不完整,发生错误!
另请参阅/cygdrive/c/Users/dell/Desktop/jetBeans/c_c++/cmake-build-debug/CMakeFiles/CMakeOutput.log。
另请参阅/cygdrive/c/Users/dell/Desktop/jetBeans/c_c++/cmake-build-debug/CMakeFiles/CMakeError.log。

[上一次CMake输出恢复:11-02-2017 04:45]


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



安装&配置CLion Student Copy ||最好的IDE for C / C ++



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



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






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


I downloaded clion and went through the setup up guide provided by jetbeans at : https://www.jetbrains.com/help/clion/2016.3/quick-tutorial-on-configuring-clion-on-windows.html I tried setting up both cygwin and minGW as the environment but the program wouldn't run. I followed this question : How to setup Clion for compile and RUN

I have appended the directories of cygwin and minGW in path too but still i can't run my program.

It raises a long error which is :

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.

It fails with the following output:

   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]

解决方案

I also faced some issues when downloading the CLion product, because it didn't work for me a lot of times. However, I then found this video:

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

What I did was that I uninstalled CLion MinGW, and I started from scratch again. It probably was not the best choice, but I could not pinpoint the problem at hand, so I then re-installed it by following the above video. CLion works for me now. The video is for installing CLion on a windows operating computer.

Just a recommendation, you can first look at the video to see if you made any mistake. Compare how the instructor in the video does it to how you did it. If you missed anything like importing a certain package (this video uses MinGW), then that's where you went wrong. That could also solve the issue then. If you cannot pinpoint the error, then try re-installing it. Good luck!


EDIT: why do you have MinGW and cygwin installed? You only need one of them.

这篇关于不能在clion中运行任何程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆