Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Strange "Run" behavior(Different behavior when running in Eclipse vs running the .exe)
Strange "Run" behavior [message #665866] Sun, 17 April 2011 10:18 Go to next message
No real name is currently offline No real name
Messages: 2
Registered: April 2011
Junior Member
I have a C++ program that should be outputting a file. However, when I run it it Eclipse, no file gets created. But if I run the .exe file outside of eclipse, created from the same build. the program runs as I expect.

I have tried with simple cout statements, and its the same thing. The Console in Eclipse does not show the proper results.

If I debug, a window pops up in by debug perspective that says "No source available for "main() at 0x04014eb".

Any thoughts? I am trying to switch from VSC++ to Eclipse, but this won't do.
Re: Strange "Run" behavior [message #665867 is a reply to message #665866] Sun, 17 April 2011 10:48 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 2
Registered: April 2011
Junior Member
Some more info...I went into debug configurations and unchecked "stop on startup at main". Now, when I debug the program, it created the file. But when I simply hit "Run", it does not.

What is going on? Is there something that needs to change between my release and debug settings?
Re: Strange "Run" behavior [message #666150 is a reply to message #665866] Tue, 19 April 2011 07:09 Go to previous message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Quote:
I have a C++ program that should be outputting a file. However, when I run it it Eclipse, no file gets created. But if I run the .exe file outside of eclipse, created from the same build. the program runs as I expect.

Where is the output saved? You should note that you have a different working directory in Eclipse (you can specify it in the Launch Configuration; default is ProjectDir).


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:EclipseCDT + Zylin plug-in
Next Topic:Moving to eclipse
Goto Forum:
  


Current Time: Sun Aug 31 06:27:55 EDT 2014

Powered by FUDForum. Page generated in 0.01550 seconds