| Wierd console behaviour for C projects. [message #558210] |
Fri, 10 September 2010 10:16  |
Devon Bain Messages: 3 Registered: September 2010 |
Junior Member |
|
|
So I have an interesting problem with Eclipse Galileo. I use it for Java, C++ and C programming. The first two work flawlessly: everything runs just like it should. C is where I have issues.
1.) I can't ever get it to build a binary, ever. So I've taken to using the included HelloWorld.c template and building whatever I'm doing off of that. If I use the template, everything works. If I don't, it can't build a binary. I have no idea why. C++ projects build just fine.
2.) When running C programs, it will take ALL input for the entire program (I've just been building simple stuff) BEFORE it displays any text at all. This is making it exceptionally difficult to debug my code. How do I get it to run like it does in the actual console, i.e. text, prompt, entry, execute?
Thank you all in advance, I appreciate any help you can give me. This is the first time I've really coded C, but I've developed in Java , VB and C++ for years and been using Eclipse for about a year - something I'd like to continue doing, since the other C IDEs really, really suck.
Again, my thanks!
Devon
|
|
|
|
|
|
|
| Re: Wierd console behaviour for C projects. [message #558308 is a reply to message #558265] |
Fri, 10 September 2010 20:27  |
David Wegener Messages: 1169 Registered: July 2009 |
Senior Member |
|
|
On Fri, 2010-09-10 at 13:04 -0400, Devon Bain wrote:
> Sadly, no. I see output just fine, let me see if I can make this clearer.
> If I have a main with the following code:
>
> Int main ()
> { int input;
>
> Printf("press y then enter");
> Scanf("%c", &input);
> return 0;}
>
> Then the console output in Eclipse will be blank until I enter a character and press return, at which point it will display the printf() and finish. It doesn't matter what order I list anything in, if I have it nested in a called function, whatever. The scanf functions of the entire program have to have input before ANY output is generated in console.
>
> And I have no idea why.
This is precisely the behavior that the FAQ referenced by Alex refers.
Follow the suggestions in the FAQ.
|
|
|
Powered by
FUDForum. Page generated in 0.02325 seconds