How to execute a CLion program in gnome terminal?

爷,独闯天下 提交于 2019-11-27 15:36:29
Glacier11

Yes, you can execute a Clion c/c++ program in a gnome terminal from the IDE. Here is how:

  1. In the top right of your clion application you should see your project name or "Build All". Click on that and go to "edit configurations"
  2. there click on the plus sign(top left) and then on "Application"
  3. Now go to "Executable:" and click on "select others". There you should go to where your gnome-terminal is stored (mine is at "/usr/bin/gnome-terminal" on ubuntu)
  4. Next go to "Program arguments:" and type -e ./myProjectName (For newer versions of gnome-terminal -e is deprecated, use -- ./myProjectName)
  5. go to "Working Directory:" and type in the location to your cmake-build-debug folder found in your project folder

  6. You can now press okay and go to the top right to select the name of your application that you created in step 2

This will run your program in the gnome terminal.

Hope this helped :)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!