Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Running C++ programs in the console
Running C++ programs in the console [message #76509] Tue, 22 July 2003 18:31 Go to next message
Eclipse UserFriend
Originally posted by: sbh4.duke.edu

Is there an easy way of running C/C++ programs in the Eclipse console window
without switching the parser from Elf to PE Windows? It is important that
the program is run within Eclipse and by double-clicking and runnning
through Windows.

If I choose "Run As", I get a "Launch failed no binaries" error because I
assume that it cannot find the ".exe" file.

If I choose "Run...", I can run it in the console but I have to specify a
configuration (too many steps).

thank you for your time,
Sam
Re: Running C++ programs in the console [message #76525 is a reply to message #76509] Tue, 22 July 2003 18:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sbh4.duke.edu

I meant to say "and NOT by double-clicking and runnning through Windows"


"Sam Heald" <sbh4@duke.edu> wrote in message
news:bfjvvl$o86$1@eclipse.org...
> Is there an easy way of running C/C++ programs in the Eclipse console
window
> without switching the parser from Elf to PE Windows? It is important that
> the program is run within Eclipse and by double-clicking and runnning
> through Windows.
>
> If I choose "Run As", I get a "Launch failed no binaries" error because I
> assume that it cannot find the ".exe" file.
>
> If I choose "Run...", I can run it in the console but I have to specify a
> configuration (too many steps).
>
> thank you for your time,
> Sam
>
>
>
>
Re: Running C++ programs in the console [message #76727 is a reply to message #76525] Thu, 24 July 2003 01:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alain.nowhere.ca

Sam Heald wrote:

> I meant to say "and NOT by double-clicking and runnning through Windows"


> "Sam Heald" <sbh4@duke.edu> wrote in message
> news:bfjvvl$o86$1@eclipse.org...
> > Is there an easy way of running C/C++ programs in the Eclipse console
> window
> > without switching the parser from Elf to PE Windows? It is important that
> > the program is run within Eclipse and by double-clicking and runnning
> > through Windows.
> >
> > If I choose "Run As", I get a "Launch failed no binaries" error because I
> > assume that it cannot find the ".exe" file.
> >

If you have the right Binary parser(assuming PE) this is how CDT discover
new binaries, since a file name *.exe is not an indication that this is
a valid binary. But when you create a project you have the choice
of choosing the parser not sure why you need to switch again.

The double-clicking is probably feasible, by the problem is where.
For example CDT is use for cross-dev, the binaries are meant to be
run elsewhere, not funny to try to run a MIPS/ARM executable on windows 8)

> > If I choose "Run...", I can run it in the console but I have to specify a
> > configuration (too many steps).
> >

"Run as"
"C local application"
C++ programs in the console [message #77190 is a reply to message #76727] Mon, 28 July 2003 08:27 Go to previous message
Eclipse UserFriend
Originally posted by: sbh4.duke.edu

> If you have the right Binary parser(assuming PE) this is how CDT discover
> new binaries, since a file name *.exe is not an indication that this is
> a valid binary. But when you create a project you have the choice
> of choosing the parser not sure why you need to switch again.

The default parser when you make a new C++ project is the Elf parser,
so you do have to manually change it (you have the option of changing it
when you make the project).

My question was how would one run a C++ project in the Eclipse console
WITHOUT using the PE Windows parser or making a Run Configuration with
"Run...".

Here are the facts/problems as I've encountered them:
1) "Run As" doesn't work with the Elf parser (as far as I can tell)
2) If you double click your executable when you have the PE parser enabled,
Eclipse tries to open the file in its text browser and usually will incur an
out of memory error as a result.
3) Running via double-clicking is problematic because the DOS window closes
when the program finishes, making it impossible to see any text output that
is generated.

I just want to be able to run C++ programs as simply as possible without
risking a crash of Eclipse in the process (see #2).

I should explain that I am a CS student working in the Duke CS
department writing documentation on how to use Eclipse as well as writing
some Duke-specific plug-ins (for example, plug-ins that'll download/submit
assignments, etc). We're going to experiment with it as a possible
development platform for intro-level CS classes. An emphasis is placed on
ease-of-use because the students involved would not be computer veterans.

"Run..." is too many steps. You have to click "Run..", then "C/C++ Local",
then "New Configuration", then type in some name for your configuration,
then type in the name of the .exe file. It's rediculous.

Using the PE Windows parser, students will have to switch the parser
manually (remembering to do so everytime), will double-click and crash
Eclipse at least once, and even if they manage to get "Run As" to work, they
still have to click which executable they'd like to run (even if there is
only one) as well as specify a debugger (which as no meaning to them at
all). No good either.

And so I repeat, how would one run a C++ project in the Eclipse console
WITHOUT using the PE Windows parser or making a Run Configuration with
"Run..."?

I could probably make a hack'ish plug-in that'll auto-generate a run
configuration, but that seems silly (not too mention that it'd probably not
work with future versions of Eclipse).
Sam
Previous Topic:Build Problem
Next Topic:Help. Eclipse won't start on my system
Goto Forum:
  


Current Time: Thu Dec 26 14:37:53 GMT 2024

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

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

Back to the top