Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » No output when running C++ applications via Eclipse CDT IDE(Using Eclipse Indigo, CDT, C++, and MinGW, on Windows 7 Home Premium 64-bit)
No output when running C++ applications via Eclipse CDT IDE [message #729002] Sat, 24 September 2011 13:34 Go to next message
Eclipse UserFriend
Eclipse can build my applications for me so far, and I can execute them directly (via Windows 7 Explorer), but I get no results when I use the run command via the CDT perspective. The console tab only tells me that the application terminated, even with a console app with input (cin >> and so forth). Win32 apps don't execute either. Once again I can execute them directly via the debug folder, so this must be an IDE issue. Is this normal? Or are there settings I could change to make it work?

Thanks for any advice! And please post if you are having the same issue!

[Updated on: Sat, 24 September 2011 13:58] by Moderator

Re: No output when running C++ applications via Eclipse CDT IDE [message #729034 is a reply to message #729002] Sat, 24 September 2011 16:21 Go to previous messageGo to next message
Eclipse UserFriend
Found the solution. It was because the workspace was under "Program Files", which has a space in it, and I believe MinGW rejects spaces for some reason.
Re: No output when running C++ applications via Eclipse CDT IDE [message #729345 is a reply to message #729034] Sun, 25 September 2011 20:33 Go to previous messageGo to next message
Eclipse UserFriend
I have the same 'no output' problem in Windows. Just trying to run this program -
#include <stdio.h>
int main() {
printf("Hello\n");
return 0;
}

I think it's finally Building correctly, but I'm not getting any output printed.
I've created this C project in both C:\Program Files and C:\EclipseC, in order to avoid the space. Also, the "Makefile" issue, it looks like I need to write my own Makefile, otherwise I get problems with creating a target and finding the executable file.
Thanks for any help.
Re: No output when running C++ applications via Eclipse CDT IDE [message #730222 is a reply to message #729345] Tue, 27 September 2011 18:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Jarrick Chagma

"rdlatimer" wrote in message news:j5ogj0$ueg$1@news.eclipse.org...

> Thanks for any help.

Try adding a variable named PATH to the Environment section of your Run
Configuration and set it to C:\MinGW\bin or wherever the bin folder in your
MinGW setup is located.

--
Regards,

Jarrick
Re: No output when running C++ applications via Eclipse CDT IDE [message #730272 is a reply to message #730222] Tue, 27 September 2011 23:41 Go to previous messageGo to next message
Eclipse UserFriend
Thanks - I think that worked, adding the PATH variable to Run Configuration.
I have versions of hello world that use a Makefile. I'm not sure I need to specify my own Makefile, it's possible Eclipse will do this for me, if I set up the project correctly?
Randy
Re: No output when running C++ applications via Eclipse CDT IDE [message #735113 is a reply to message #729002] Mon, 10 October 2011 21:10 Go to previous message
Eclipse UserFriend
And I also fixed the output problem by moving MinGW out of the Program Files directory. Make sure its directory contains no spaces!
Previous Topic:Pure Virtual functions in CDT
Next Topic:DecoratingStyledCellLabelProvider for Project Explorer?
Goto Forum:
  


Current Time: Wed Jul 16 02:07:21 EDT 2025

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

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

Back to the top