Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] How do I get eclipse/cdt to read from the standardinpu t?

Hi Alex-
   Maybe I am misunderstanding your answer, but what I am most
interested in is running my program using the eclipse debugger.
Therefore, I do not want to run the program using the shell.  In fact,
the program runs fine if it is started from the shell.
   Also, I could rewrite the program to accept the filename as an
argument and create an input stream, but I would like to avoid tampering
with the source code as it is someone else's code I am trying to
understand.  Furthermore, it seems like there ought to be a way to make
eclipse do this.  Anybody know?  Please let me know if the question is
still not clear.

Thanks,
Stephen

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Alex Chapiro
Sent: Wednesday, November 09, 2005 9:11 AM
To: CDT General developers list.
Subject: Re: [cdt-dev] How do I get eclipse/cdt to read from the
standardinpu t?

I think, this is a shell (win32 or unix) who does the job. So instead of

launching the program itself, launsh cmd.exe for Windows or sh/bash for 
Linux. Or change the program so it expects the  file name to be passed 
as a command line  argument.

Stephen McLaughlin wrote:

>Hello-
>   I am new to eclipse and accustomed to writing c/c++ programs using
>the command line.  I have a c/c++ project I am trying to understand
>written by someone else, so I thought using eclipse would make the job
>easier since I can use the debugger (this program runs strictly under
>linux, so microsoft is not an option).  I have what I believe is a very
>simple question.  Let's say I want to run a program called
"my_program".
>This program first collects several arguments (written in Boulder I/O
>format) from the standard input.  The Boulder I/O values are placed in
a
>file called "my_input_file".  So it looks something like this:
>
>arg1=14
>arg2=your_name
>arg3=55.6
>
>  The program can be successfully run on the command line as follows:
>
>[]$./my_program < my_input_file
>
>  I know how to run my program using Eclipse, but I don't know how to
>get it to read the arguments out of a file like this.  Is this
possible?
>The first thing I tried was under the Arguments tab typing:
>
>< my_input_file
>
>  But, no dice.    I'd appreciate any help; thanks!
>
>-Stephen
>
>
>  
>
>-----------------------------------------------------------------------
-
>
>_______________________________________________
>cdt-dev mailing list
>cdt-dev@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/cdt-dev
>  
>
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top