我正在努力在Windows 10上使用CLion运行程序。几周前运行良好,我唯一想到的可能是已损坏的东西是安装git。
从下图可以看到,运行按钮显示为灰色,运行配置显示“没什么可以继续运行”,我猜这是指目标。
我尝试过接受该问题的答案中概述的步骤:如何设置CLion进行编译和运行?
C:\MinGW
C:\MinGW
和C:\MinGW\bin
的路径If I run this program through 'Run->Run...' and select the 'Wahum' run configuration, I get the following output in my Event Log:
Error running 'Wahum': Cannot run 'Wahum' on '<default>'
It seems to me that there is a valid CMakeLists.txt in your directory, however CLion is not finding it. This is probably happening because you have deleted/misplaced some files from your .idea directory. I'm not sure this is the optimal solution, but what has helped me in this situation is to re-import the project.
File-> Import Project... and select directory with your project.
您将收到警告消息,目录“ {dir}”已包含CMake项目,继续并选择“打开现有项目”,在此窗口中选择“打开”,然后CLion应该再次识别您的CMakeList.txt并运行cmake(对我来说有用)至少)。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句