这个问题已经有了答案这里但我正在使用CLion 1.2.1 版和该帖子中的答案无济于事.可以在 gnome 终端而不是它自己的控制台中运行 CLion 程序吗?如果是,如何?谢谢.
This question already has an answer here but I am using CLion version 1.2.1 and the answer in that post doesn't help. It is possible to run a CLion program in gnome terminal instead of its own console ? If yes, how ? Thanks.
我知道可执行文件的存储位置,但想知道是否可以直接从 ide 中在终端中运行该文件,即通过在 ide 中选择运行选项.
EDIT : I know where the executable file are stored but want to know if it is possible to run the file in terminal directly from the ide i.e. by selecting the run option in ide.
是的,您可以从 IDE 在 gnome 终端中执行 Clion c/c++ 程序.方法如下:
Yes, you can execute a Clion c/c++ program in a gnome terminal from the IDE. Here is how:
-e ./myProjectName
(对于较新版本的 gnome-terminal -e
已弃用,请使用 -- ./myProjectName
)转到工作目录:"并输入您在项目文件夹中找到的 cmake-build-debug 文件夹的位置
-e ./myProjectName
(For newer versions of gnome-terminal -e
is deprecated, use -- ./myProjectName
)go to "Working Directory:" and type in the location to your cmake-build-debug folder found in your project folder
您现在可以按确定并转到右上角,选择您在第 2 步中创建的应用程序的名称
You can now press okay and go to the top right to select the name of your application that you created in step 2
这将在 gnome 终端中运行您的程序.
This will run your program in the gnome terminal.
希望这有帮助:)
这篇关于如何在 gnome 终端中执行 CLion 程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!