Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Question on supplying arguments to the command line executable(interactive run parameters)
Question on supplying arguments to the command line executable [message #1395389] Sun, 06 July 2014 21:31 Go to next message
website reader3 is currently offline website reader3
Messages: 4
Registered: July 2014
Junior Member
How can I get the C/C++ builder portion of Eclipse to behave like the typical bash shell in linux when the executable is run which needs arguments?

% my_program_name my_parameter1 myparameter2

It is easy to have the program, once running, ask for input, but this is for input before the program is invoked.

Thanks!

P.S. CDT reports that the program ran fine with no input, but gave the typical Args: Command Options error output that I set in the part of the program parsing input, in red font. I prefer NOT to hard set the arguments.
Re: Question on supplying arguments to the command line executable [message #1395977 is a reply to message #1395389] Mon, 07 July 2014 17:47 Go to previous messageGo to next message
Joost Kraaijeveld is currently offline Joost Kraaijeveld
Messages: 173
Registered: July 2009
Senior Member
On 07-07-14 15:37, website reader3 wrote:
> How can I get the C/C++ builder portion of Eclipse to behave like the
> typical bash shell in linux when the executable is run which needs
> arguments?
>
> % my_program_name my_parameter1 myparameter2
>
> It is easy to have the program, once running, ask for input, but this is
> for input before the program is invoked.

Run->Run Configurations -> C/C++ Applications -> Arguments -> Program
arguments

Joost
Re: Question on supplying arguments to the command line executable [message #1397460 is a reply to message #1395977] Wed, 09 July 2014 19:17 Go to previous messageGo to next message
website reader3 is currently offline website reader3
Messages: 4
Registered: July 2014
Junior Member
The proposed solution is exactly what I was trying to avoid (no offense meant) Please note that I meant that command parameters were to be given to the program before Eclipse actually started up, but in an interactive command line window.
Re: Question on supplying arguments to the command line executable [message #1397646 is a reply to message #1397460] Thu, 10 July 2014 01:39 Go to previous message
David Wegener is currently offline David Wegener
Messages: 1344
Registered: July 2009
Senior Member
On 07/09/2014 02:17 PM, website reader3 wrote:
> The proposed solution is exactly what I was trying to avoid (no offense
> meant) Please note that I meant that command parameters were to be
> given to the program before Eclipse actually started up, but in an
> interactive command line window.
>
You can use the Variables button on the Arguments tab of the Launch
Config to specify a String Prompt. This will popup a window prompt when
you invoke the launch. You can type your arguments into the prompt text
field. The text you type is parsed as it would be from the command
line. Spaces separate arguments. Double quotes will be stripped and
the text inside passed as one argument.
Previous Topic:Ubunut apt-get eclipse-cdt and no c++ projects available
Next Topic:Helios SR1: cannot step into a shared library in remote debugging
Goto Forum:
  


Current Time: Fri Oct 24 14:46:24 GMT 2014

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

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