Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Compile in Eclipse and run in gnome-terminal (Ubuntu)
icon8.gif  Compile in Eclipse and run in gnome-terminal (Ubuntu) [message #815192] Wed, 07 March 2012 10:37 Go to next message
Carlos Qarl is currently offline Carlos QarlFriend
Messages: 12
Registered: March 2012
Junior Member
Hello!!

I'm using eclipse for write programs C/C++. But, I have a question.
I need compile in Eclipse and then, run the program in "gnome-terminal" (terminal of Ubuntu).
I don't like the terminal of Eclipse for this, sorry.

Can someone help me please??

Thank you, Regards!! Very Happy

[Updated on: Mon, 12 March 2012 17:36]

Report message to a moderator

Re: Compile in Eclipse and run in gnome-shell (Ubuntu) [message #815240 is a reply to message #815192] Wed, 07 March 2012 12:07 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
http://wiki.eclipse.org/CDT/User/FAQ#HOWTO_debug_applications_which_require_a_real_terminal

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Compile in Eclipse and run in gnome-shell (Ubuntu) [message #815266 is a reply to message #815240] Wed, 07 March 2012 12:47 Go to previous messageGo to next message
Carlos Qarl is currently offline Carlos QarlFriend
Messages: 12
Registered: March 2012
Junior Member
Thank you very much, but I don't understand...
Where set these lines? I'm lost!

Regards!

[Updated on: Wed, 07 March 2012 12:47]

Report message to a moderator

Re: Compile in Eclipse and run in gnome-shell (Ubuntu) [message #815359 is a reply to message #815266] Wed, 07 March 2012 14:58 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
You should run these commands from gnome-shell before you start your application.

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Compile in Eclipse and run in gnome-shell (Ubuntu) [message #816076 is a reply to message #815359] Thu, 08 March 2012 11:54 Go to previous messageGo to next message
Carlos Qarl is currently offline Carlos QarlFriend
Messages: 12
Registered: March 2012
Junior Member
The first, I said "gnome-shell" but is "gnome-terminal", sorry! Smile

Now, I've tried and the terminal return someone errors...
I believe that you don't understand me. I want run my programs with my "External Tools" predefined (gnome-terminal).

Regards and thank you for support!! Smile
Re: Compile in Eclipse and run in gnome-shell (Ubuntu) [message #819075 is a reply to message #816076] Mon, 12 March 2012 13:09 Go to previous messageGo to next message
Carlos Qarl is currently offline Carlos QarlFriend
Messages: 12
Registered: March 2012
Junior Member
Nothing?? Sad
Re: Compile in Eclipse and run in gnome-shell (Ubuntu) [message #819860 is a reply to message #819075] Tue, 13 March 2012 12:16 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
I don't understand what you want to accomplish. You want to run your application in gnome-terminal? So why don't you open a gnome-terminal, switch to the path of your application and start it?

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Compile in Eclipse and run in gnome-shell (Ubuntu) [message #819958 is a reply to message #819860] Tue, 13 March 2012 14:51 Go to previous messageGo to next message
Carlos Qarl is currently offline Carlos QarlFriend
Messages: 12
Registered: March 2012
Junior Member
Yes... but, Is not possible that eclipse runs the compiled program automatically??
The path of my projects are very long, so is very bored switch in with terminal hehehe.

Regards friend!! Wink

[Updated on: Tue, 13 March 2012 14:51]

Report message to a moderator

Re: Compile in Eclipse and run in gnome-shell (Ubuntu) [message #819994 is a reply to message #819958] Tue, 13 March 2012 15:41 Go to previous messageGo to next message
Fabien Bourrel is currently offline Fabien BourrelFriend
Messages: 14
Registered: February 2012
Junior Member
<off_topic>
Btw, there still is aliases in terminal.
</off_topic>
Whatever, I do not understand what you expect Eclipse to do...
Do you want to integrate your gnome-terminal into your Eclipse?
How do you want to compile your project? Why do you need terminal to run it? Something particular about your project or you just want to know how to run a project in Eclipse?
Eclipse can run applications but you do not give a lot of information...
Re: Compile in Eclipse and run in gnome-shell (Ubuntu) [message #820126 is a reply to message #819994] Tue, 13 March 2012 19:09 Go to previous messageGo to next message
Carlos Qarl is currently offline Carlos QarlFriend
Messages: 12
Registered: March 2012
Junior Member
First, sorry for not giving enough information.

I am building programs in console (exercises of the school). In the school, we're using CodeBlocks for these exercises, CodeBlocks runs his applications on x-term by default.

The next month, I will go to a contest with two friends of school. In this contest, you can only build programs with Eclipse, Anjuta or GCC/G++. Obvioulsy, the teacher will test the program in gnome-shell.

We want use Eclipse in the contest, because is the favourite tool for us.

You understand me now?

Regards and sorry for my bad explanations!
Re: Compile in Eclipse and run in gnome-shell (Ubuntu) [message #820815 is a reply to message #820126] Wed, 14 March 2012 15:51 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
OK, I think I understand it.
- build your application
- create a launch config: in main menu choose Run->Run Configurations...
- New: C/C++ application
- on the main tab in the field C/C++ Application enter
/usr/bin/gnome-terminal

- switch to arguments tab and for program arguments enter:
-e ./MYAPP

- Working directory: Uncheck "Use default" and click Workspace button to select the folder with your application
- switch to the common tab und uncheck "Allocate console"
- Run


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Compile in Eclipse and run in gnome-shell (Ubuntu) [message #821796 is a reply to message #820815] Thu, 15 March 2012 20:54 Go to previous messageGo to next message
Carlos Qarl is currently offline Carlos QarlFriend
Messages: 12
Registered: March 2012
Junior Member
Yeeahh!! You're the best!
One last thing, Is it possible that the terminal not close when the program ends?
Also helped me a lot! Thank you very much!!

Good day! Wink
Re: Compile in Eclipse and run in gnome-shell (Ubuntu) [message #822126 is a reply to message #821796] Fri, 16 March 2012 07:49 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Carlos Qarl wrote on Thu, 15 March 2012 21:54

One last thing, Is it possible that the terminal not close when the program ends?

I don't know. There are some discussions about this on stackoverflow http://stackoverflow.com/questions/3512055/avoid-gnome-terminal-close-after-script-execution


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Compile in Eclipse and run in gnome-shell (Ubuntu) [message #1687981 is a reply to message #822126] Fri, 20 March 2015 02:09 Go to previous message
Simon Dahlberg is currently offline Simon DahlbergFriend
Messages: 1
Registered: March 2015
Junior Member

Is there anyway of making that configuration of running the C program in the gnome terminal general, so that I dont have to change all that for every single program?

Thanks in advance
Simon
Previous Topic:include search path confusion
Next Topic:Issue with dynamic options
Goto Forum:
  


Current Time: Thu Apr 25 19:44:26 GMT 2024

Powered by FUDForum. Page generated in 0.04744 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top