Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » No Console Output (MinGW, CDT)
icon9.gif  No Console Output (MinGW, CDT) [message #629872] Wed, 29 September 2010 19:35 Go to next message
Colin is currently offline ColinFriend
Messages: 3
Registered: September 2010
Junior Member
Hey all-

I seem to be having an issue getting the Eclipse Console to output a running C++ program using CDT and MinGW. The program simply terminates without any output. If i open up the .exe in a cmd window, it runs perfectly fine.

For example, implementing the default "HelloWorld" template program in a new C++ project, ie-
#include <iostream>
using namespace std;

int main() {
	cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
	return 0;
}

-results in not output to the console within Eclipse, after selecting 'Run As --> Local C/C++ Application'. I can view the results of the build process console output, but no actual program output (remains blank).

I've been scanning the web and these forums all day, with no luck (including finding some potentially similar problems with non-working answers). Sad Anyone have any potential solutions?

I'm currently running Helios SP1 and CDT 7.0.1 on Windows 64-bit.
Thanks in advance!

EDIT: Implementing the default C (not C++) "HelloWorld" template program in a new C project does produce output to the console. It seems only C++ output is not being shown.

[Updated on: Wed, 29 September 2010 19:50]

Report message to a moderator

Re: No Console Output (MinGW, CDT) [message #629932 is a reply to message #629872] Thu, 30 September 2010 02:44 Go to previous messageGo to next message
Tom Mising name is currently offline Tom Mising nameFriend
Messages: 13
Registered: September 2010
Junior Member
I posted about the same problem approx a week ago.

No one has any clue on how to fix it?

I'm curious though. Are you running all 64 bit stuff (Windows, Java, Eclipse) or 32 bit? The reason I ask is because everything worked fine for me on my old laptop when it was all 32 bit. Now on this laptop, it's all 64 bit and no console output.
Re: No Console Output (MinGW, CDT) [message #629941 is a reply to message #629932] Thu, 30 September 2010 05:25 Go to previous messageGo to next message
Colin is currently offline ColinFriend
Messages: 3
Registered: September 2010
Junior Member
I am running all 64-bit installations (Windows 7, Java SDK, Eclipse IDE).

What has me confused, though, is how C programs output just fine, but C++ fails to show any response in the console.

I might try to bump down to 32-bit Eclipse/Java installations and see how that fairs.
Re: No Console Output (MinGW, CDT) [message #630039 is a reply to message #629941] Thu, 30 September 2010 13:29 Go to previous messageGo to next message
Tom Mising name is currently offline Tom Mising nameFriend
Messages: 13
Registered: September 2010
Junior Member
Please let me know if that works out. I'm in the middle of taking a class and it took me forever to get everything else working. I'll make the jump if you have success.
Re: No Console Output (MinGW, CDT) [message #630135 is a reply to message #629872] Thu, 30 September 2010 18:04 Go to previous messageGo to next message
Colin is currently offline ColinFriend
Messages: 3
Registered: September 2010
Junior Member
It worked.

Here's what i did:

[1] Uninstall
- Removed all traces of Eclipse (64-bit).
- Removed all traces of MinGW (and/or Cygwin).
- Removed all traces of Java (SDK and JRE).

[2] Restart PC

[3] Install
- Installed latest Java JDK (includes the JRE) 32-bit.
- Installed Eclipse IDE (Java Edition) 32-bit.
- Installed MinGW (with Msys).
- Installed the necessary CDT tools from within Eclipse.

And it works fine!

For installation compiler/CDT installation, i followed this guide (making my own alterations where needed):
http://max.berger.name/howto/cdt/cdt.jsp

Hope it works for you! And thanks for the tip-off that it was working 100% on a 32-bit machine. Very Happy
Re: No Console Output (MinGW, CDT) [message #630143 is a reply to message #630135] Thu, 30 September 2010 19:01 Go to previous messageGo to next message
Charis  is currently offline Charis Friend
Messages: 2
Registered: September 2010
Junior Member
Thank you for this solution, friend.

I also had the same problem, and now it is fixed. I must note, however, that all I had to do was download the 32-bit version of Eclipse C++. Replacing the 64-bit JDK with the 32-bit one was not necessary Smile

Also, there are a few weird additional symptoms you might have not noticed. Eg, the program does run but it terminates with a very large negative number instead of 0. Also, debugging the program partially works in that it does show the output when I move step by step, but then it breaks down when I try to enter input.

[Updated on: Thu, 30 September 2010 19:07]

Report message to a moderator

Re: No Console Output (MinGW, CDT) [message #630267 is a reply to message #629872] Fri, 01 October 2010 11:24 Go to previous messageGo to next message
Jakub is currently offline JakubFriend
Messages: 1
Registered: July 2009
Junior Member
I have the EXACTLY same problem.

I am using 32-bit desktop and 64-bit laptop (with projects synchronized between these 2 machines).

Running C Hello world on 32-bit produces outputs as it sould. Running the same program on 64-bit produces no output whatsoever.

If I use 32-bit version on 64-bit Windows (laptop), everything works fine.

Maybe we should fill a bug in bugzilla... Or is it a known problem with known fix?
Re: No Console Output (MinGW, CDT) [message #630361 is a reply to message #630267] Fri, 01 October 2010 17:58 Go to previous messageGo to next message
Charles Wilson is currently offline Charles WilsonFriend
Messages: 16
Registered: July 2009
Junior Member
On 10/1/2010 7:24 AM, Jakub wrote:

> Maybe we should fill a bug in bugzilla... Or is it a known problem with
> known fix?

Tom already knows this, but there is already a bug on this issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=236330

It's been there for two years.

--
Chuck
Re: No Console Output (MinGW, CDT) [message #636493 is a reply to message #630135] Mon, 01 November 2010 15:14 Go to previous messageGo to next message
Dan  is currently offline Dan Friend
Messages: 1
Registered: November 2010
Junior Member
I encountered the exact same problem.

Stack:
Windows XP
MinGW
Eclipse Helios CDT

I downloaded and installed mingw, and confirmed it was working from the command line. Then downloaded and unzipped Eclipse Helios CDT and ran it. Opened the help menu and did the CDT Hello World tutorial. Upon running the application, got no console output. Upon running HelloWorld.exe from the command line outside Eclipse, it ran fine and had output.

Google brought me to this thread. Upon seeing the comment about reinstalling and rebooting, I rebooted (did NOT reinstall). Post-reboot, the C++ console output works. No idea why.
Re: No Console Output (MinGW, CDT) [message #636683 is a reply to message #636493] Tue, 02 November 2010 13:16 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
See http://wiki.eclipse.org/CDT/User/FAQ#Eclipse_console_does_no t_show_output_on_Windows

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: No Console Output (MinGW, CDT) [message #636690 is a reply to message #636683] Tue, 02 November 2010 13:26 Go to previous messageGo to next message
Tom Mising name is currently offline Tom Mising nameFriend
Messages: 13
Registered: September 2010
Junior Member
Axel Mueller wrote on Tue, 02 November 2010 09:16
See http://wiki.eclipse.org/CDT/User/FAQ#Eclipse_console_does_no t_show_output_on_Windows

This doesn't work either.
Re: No Console Output (MinGW, CDT) [message #637571 is a reply to message #629872] Sun, 07 November 2010 00:05 Go to previous messageGo to next message
Andrew Rootmann is currently offline Andrew RootmannFriend
Messages: 5
Registered: July 2009
Junior Member
I have a 32-bit environment (Win XP, JDK 1.6_20, Eclilpse 3.6.1, Cygwin gcc 4.5.0 and CDT 7.0.1) and I am having the same problem.

I can see the stdout after a flush(cout) call, but this only works under debugger. Nothing is output to the console when I simply run (Ctrl+F11) the application (the "Hello world" one) from Eclipse. To add insult to injury, all of my stderr output is now completely gone. Even flush(cerr) doesn't help (although flushing is redundant anyway since stderr is unbuffered). stderr is not available neither in Debug nor Run modes. This is very sad, to say the least...

In the Eclipse log I see some
java.io.IOException: Pipe closed
exceptions that seem to correspond to my debug runs.

Has anyone figured out how to solve this problem or reported a bug?
Re: No Console Output (MinGW, CDT) [message #642689 is a reply to message #629872] Thu, 02 December 2010 11:36 Go to previous messageGo to next message
Sunghyun Mising name is currently offline Sunghyun Mising nameFriend
Messages: 8
Registered: December 2010
Junior Member

I use Linux for developing software, but recently

I've got Eclipse Helios installed on Windows 7 64bit

for some project. I've installed MinGW and gdb.

In the command line can I see the program output

result but that is not the case with console inside

Eclipse. Hasn't this issue been fixed yet?
Re: No Console Output (MinGW, CDT) [message #642699 is a reply to message #642689] Thu, 02 December 2010 12:30 Go to previous messageGo to next message
Sunghyun Mising name is currently offline Sunghyun Mising nameFriend
Messages: 8
Registered: December 2010
Junior Member

I have just found a workaround in this thread. I hope

it will work. But hasn't the issue in 64 bit version been

fixed yet?
Re: No Console Output (MinGW, CDT) [message #643081 is a reply to message #630143] Sat, 04 December 2010 01:15 Go to previous messageGo to next message
Sunghyun Mising name is currently offline Sunghyun Mising nameFriend
Messages: 8
Registered: December 2010
Junior Member

Hi, I've just tried the workaround method mentioned above.

But it still doen't work. Could you be more specific on the procedures?

I use 64 bit JDK and installed Helios Eclipes 32bit which failed to

find the jre although it was in the PATH so I copied the jre folder into

Eclipse. It opens but fails to output in the console. Of course I did this on

Windows 7 64bit.
Re: No Console Output (MinGW, CDT) [message #643238 is a reply to message #643081] Mon, 06 December 2010 08:32 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Sunghyun wrote on Sat, 04 December 2010 02:15

Hi, I've just tried the workaround method mentioned above.

But it still doen't work. Could you be more specific on the procedures?

I use 64 bit JDK and installed Helios Eclipes 32bit which failed to

find the jre although it was in the PATH so I copied the jre folder into

Eclipse. It opens but fails to output in the console. Of course I did this on

Windows 7 64bit.


Eclipes 32bit needs a 32Bit JRE/JDK!


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: No Console Output (MinGW, CDT) [message #647424 is a reply to message #629872] Thu, 06 January 2011 09:06 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 1
Registered: January 2011
Junior Member
I encountered similar problem.

Enviroment:

jdk1.6u18 64bit + Eclipse Helios 64bit + win7 64bit

No console output at "Run", but output correctly at "Debug".

The following method worked for me:

1 Goto Project->Properties->Run/Debug Settings, choose the .exe file and press "Edit"

2 In the "Environment" tag, press "New", set it as:
"Name:PATH"
"Value:C:\MinGW\bin"

In fact, I have already set "C:\MinGW\bin" in windows PATH environment variable, but it samed not work......
Re: No Console Output (MinGW, CDT) [message #648408 is a reply to message #647424] Wed, 12 January 2011 18:53 Go to previous messageGo to next message
Bran  is currently offline Bran Friend
Messages: 1
Registered: January 2011
Junior Member
Alternately include "-static" in your linker command.

Project Properties -> C/C++ Build -> Settings -> Tool Settings -> MinGW C++ Linker



Re: No Console Output (MinGW, CDT) [message #649727 is a reply to message #629872] Thu, 20 January 2011 13:00 Go to previous messageGo to next message
Javier Villa is currently offline Javier VillaFriend
Messages: 1
Registered: January 2011
Junior Member
Hi,

I am running 64-bit Eclipse (W7 64bit, jdk 1.6 64bit) and was
having the same issue. I tried the FAQ suggestion but didn't
work, as well as flushing manually.

I was getting output if I debugged the app, though. What I did
was head to the location pointed above:

Project Properties -> C/C++ Build -> Settings -> Tool Settings

And from there I noticed (Tool Chain Editor) that the project was using Cygwin for building (I had tried it but couldn't get everything set up right, so I switched to Mingw afterwards, or so I thought lol). Changing to Mingw I got console output without having to revert to 32bit on eclipse/jdk.

No -static flag or additional path settings were set up either.

So in a nutshell, changing to MinGW and ensuring it is used for the current project was what fixed it for me, hope it helps somebody.

Edit: haven't tested for C++ output / cout

[Updated on: Thu, 20 January 2011 20:03]

Report message to a moderator

Re: No Console Output (MinGW, CDT) [message #659377 is a reply to message #647424] Sun, 13 March 2011 04:51 Go to previous messageGo to next message
James Doyle is currently offline James DoyleFriend
Messages: 1
Registered: March 2011
Junior Member
This worked for me...

I also have the location of the MingW Complier in my systems PATH variable however no output in Eclipse's console. Program complies fine and executes correctly on the command-line but not within Eclipse. I added the variable AGAIN in this location and it began working. I can now see output.
Re: No Console Output (MinGW, CDT) [message #661370 is a reply to message #647424] Thu, 24 March 2011 12:23 Go to previous messageGo to next message
Sunghyun Mising name is currently offline Sunghyun Mising nameFriend
Messages: 8
Registered: December 2010
Junior Member
No Real Name wrote on Thu, 06 January 2011 04:06
I encountered similar problem.

Enviroment:

jdk1.6u18 64bit + Eclipse Helios 64bit + win7 64bit

No console output at "Run", but output correctly at "Debug".

The following method worked for me:

1 Goto Project->Properties->Run/Debug Settings, choose the .exe file and press "Edit"

2 In the "Environment" tag, press "New", set it as:
"Name:PATH"
"Value:C:\MinGW\bin"

In fact, I have already set "C:\MinGW\bin" in windows PATH environment variable, but it samed not work......


Thank you very much for the tip. This REALLY worked!!!


Re: No Console Output (MinGW, CDT) [message #661658 is a reply to message #661370] Fri, 25 March 2011 19:53 Go to previous messageGo to next message
diego is currently offline diegoFriend
Messages: 8
Registered: March 2011
Junior Member
Super useful, thanks.
Re: No Console Output (MinGW, CDT) [message #665166 is a reply to message #661370] Wed, 13 April 2011 14:30 Go to previous messageGo to next message
David Gibbs is currently offline David GibbsFriend
Messages: 1
Registered: April 2011
Junior Member
Hi,
I'm using the cygwin tool chain. I added my cygwin bin location to the PATH environment variable as above and it fixed the problem.
No other changes.

"Name:PATH"
"Value:c:\cygwin\bin"

thanks
Dave

[Updated on: Wed, 13 April 2011 14:31]

Report message to a moderator

Re: No Console Output (MinGW, CDT) [message #707528 is a reply to message #665166] Mon, 01 August 2011 19:20 Go to previous messageGo to next message
Marc-André Laperle is currently offline Marc-André LaperleFriend
Messages: 256
Registered: July 2009
Senior Member
Hi,

I added Windows x86_64 support yesterday. If you have problems seen only with the 64 bit version, you can try a nightly build and see if it fixes it:

https://hudson.eclipse.org/hudson/job/cdt-nightly/
Re: No Console Output (MinGW, CDT) [message #709346 is a reply to message #647424] Wed, 03 August 2011 20:46 Go to previous messageGo to next message
CGO SenseiC is currently offline CGO SenseiCFriend
Messages: 16
Registered: July 2011
Junior Member
No real name wrote on Thu, 06 January 2011 04:06
I encountered similar problem.The following method worked for me:

1 Goto Project->Properties->Run/Debug Settings, choose the .exe file and press "Edit"

2 In the "Environment" tag, press "New", set it as:
"Name:PATH"
"Value:C:\MinGW\bin"


BINGO!
Re: No Console Output (MinGW, CDT) [message #715434 is a reply to message #709346] Sun, 14 August 2011 01:39 Go to previous messageGo to next message
CGO SenseiC is currently offline CGO SenseiCFriend
Messages: 16
Registered: July 2011
Junior Member
well my platform (Win7 x64) exhibited the same behavior. The "path" approach did NOT resolve it, but adding -static to the MinGW linker flags (MinGW C++ Linker > Miscellaneous) DID resolve.

The strange thing (to me)... debugger almost always DID display output, but only "Release" exhibited the behavior. Still don't understand why static resolves it though.

SenseiC bows out.
Re: No Console Output (MinGW, CDT) [message #723368 is a reply to message #715434] Thu, 08 September 2011 12:27 Go to previous messageGo to next message
Ralf is currently offline RalfFriend
Messages: 1
Registered: June 2011
Junior Member
One more thing to increase confusion: In a first step the PATH solution DID work for me and I successfully produced output for the "Hello World" program. But, then I only linked a static library (libtiff) and called some simple function from it and the output did not work anymore. (Although I can produce output using the Windows console.) Commenting out the simple library function brought back output. Strange, isn't it?
icon10.gif  Re: No Console Output (MinGW, CDT) [message #724073 is a reply to message #723368] Sat, 10 September 2011 16:47 Go to previous messageGo to next message
sydraps is currently offline sydrapsFriend
Messages: 1
Registered: September 2011
Junior Member
Hi Guys,

I fixed the problem on my win 7 x64 PC. In the Eclipse window go to Preferences > C/C++ (Expand it) > Environment > Add:

"Name:PATH"
"Value:C:\MinGW\bin"

If this does not fix it. Try adding the above to the system environment variables on your pc in Computer > Advanced System settings

Good Luck!! Cool Cool Cool
Re: No Console Output (MinGW, CDT) [message #808446 is a reply to message #723368] Mon, 27 February 2012 19:53 Go to previous messageGo to next message
Naeemeg Shakoori is currently offline Naeemeg ShakooriFriend
Messages: 2
Registered: February 2012
Junior Member
Hi Ralf,

I'm having exactly the same issue. Can you tell me what you did to fix this?

Thanks,
Naeemeh
Re: No Console Output (MinGW, CDT) [message #809350 is a reply to message #724073] Tue, 28 February 2012 19:34 Go to previous messageGo to next message
Enrico R. is currently offline Enrico R.Friend
Messages: 45
Registered: July 2009
Location: Germany
Member

sydraps wrote on Sat, 10 September 2011 18:47
Hi Guys,

I fixed the problem on my win 7 x64 PC. In the Eclipse window go to Preferences > C/C++ (Expand it) > Environment > Add:

"Name:PATH"
"Value:C:\MinGW\bin"

Hi,

thanks a lot for that, it resolved this problem for me. Smile

But one thing:
On Eclipse 3.7.2 and CDT 8.0.2 the preferences for environment variables can be found in Eclipse at:
Window ->Preferences->C/C++->Build->Environment

Running Eclipse 3.7 64Bit + JDK 1.7.3 64Bit on Win7 64Bit.

Thanks again!

Best regards...
Re: No Console Output (MinGW, CDT) [message #1006589 is a reply to message #629872] Fri, 01 February 2013 02:20 Go to previous messageGo to next message
Fariza Kylyshbek is currently offline Fariza KylyshbekFriend
Messages: 1
Registered: February 2013
Junior Member
I got the same problem,
you can try this full instructions:
Re: No Console Output (MinGW, CDT) [message #1058151 is a reply to message #1006589] Sun, 12 May 2013 15:49 Go to previous messageGo to next message
Stefan van Dongen is currently offline Stefan van DongenFriend
Messages: 1
Registered: May 2013
Junior Member
Hi all,

To add some more peculiarities to the behavior described in this topic I'd like to share my experiences.
I'm running Windows 7 and Eclipse Juno 64 bit with MinGW.

I use the standard C++ hello world example to test the debugger and running the application.

From the start I have had output in the console in both debug and run mode. However, the console would not take any input.
After trying the many solutions listed here and elsewhere I had one success.

Adding the MinGW path to the environment variables of the run configuration enables the console to take user input.
Repeating this step for the debugger did not solve it there.

Adding the flush commands did not solve the problem.

Adding static options to the MinGW linker under Project Properties->C/C++ Build->Settings->MinWG C++ Linker->Miscellaneous did not solve the problem.
MinGW is set as the debugger at all the relevant places. In the main Debug Configuration tab all settings refer to the Debug build.

When I terminate the debugger the console buffer does seem to be flushed, as any characters I typed are sent to the program. Additionally, the termination command of the debugger also appears to generate some output that is sent to the program.

Output looks like this:
HelloWorld!
HelloWorld!
HelloWorld!
HelloWorld!
HelloWorld!
To exit, press 'm'
aaaaa
You just entered a. You need to enter m to exit.
You just entered a. You need to enter m to exit.
You just entered a. You need to enter m to exit.
You just entered a. You need to enter m to exit.
You just entered a. You need to enter m to exit.
You just entered 2. You need to enter m to exit.
You just entered 0. You need to enter m to exit.
You just entered -. You need to enter m to exit.
You just entered g. You need to enter m to exit.
You just entered d. You need to enter m to exit.
You just entered b. You need to enter m to exit.
You just entered -. You need to enter m to exit.
You just entered e. You need to enter m to exit.
You just entered x. You need to enter m to exit.
You just entered i. You need to enter m to exit.
You just entered t. You need to enter m to exit.

Any ideas to fix this behavior of the debugger are more than welcome. To stress, in Run mode the console works fine.

Many thanks,

Stefan
Re: No Console Output (MinGW, CDT) [message #1074405 is a reply to message #1058151] Fri, 26 July 2013 17:29 Go to previous messageGo to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 4
Registered: November 2009
Junior Member
I had the problem after first install of eclipse C++ and MinGW. I don't know how i solved, but i write what i did.
The first install of eclipse for C++ 64bit was in c:\eclipseCpp, and the workspace (set as default + option "don't ask again") was in c:\eclipseCpp\workspace (notice that it's in the same folder)

After read this forum, i started downloading eclipse C++ 32 bit, and instead of deleting the previous installed eclipse, I renamed its folder:
c:\eclipseCpp --> c:\eclipseCpp64

Since still the eclipse32 was not downloaded, while waiting I started eclipse64 from the new location, and it couldn't find the workspace (of course, because i renamed the folder that contained also the default workspace!) so i switched to the new workspace path: c:\eclipseCpp64\workspace
Eclipse restarted, clicked on the .exe file "run as..." and... the console is working Cool Shocked . So i didn't need to install eclipse32.

I don't know if i can give more details. The project was an hello world, and in the properties i set is at UTF-8 because with my print i wanted to test also accented letters.

CONCLUSION: try to rename the folder where you have eclipse, if that doesn't work, try also to rename the folder with your workspace without telling that to eclipse, then restart eclipse and switch workspace. Or maybe it's enough to just switch workspace?

[Hope my english is clear, to write so long text in foreign language was really tiring so i hope you understand]
Buona fortuna!

[Updated on: Fri, 26 July 2013 17:34]

Report message to a moderator

Re: No Console Output (MinGW, CDT) [message #1083408 is a reply to message #1006589] Fri, 09 August 2013 23:09 Go to previous messageGo to next message
NQ Song is currently offline NQ SongFriend
Messages: 1
Registered: August 2013
Junior Member
Fariza Kylyshbek wrote on Thu, 31 January 2013 21:20
I got the same problem,
you can try this full instructions:


this works good for me
Re: No Console Output (MinGW, CDT) [message #1085358 is a reply to message #629872] Mon, 12 August 2013 20:30 Go to previous messageGo to next message
satalbak com is currently offline satalbak comFriend
Messages: 2
Registered: August 2013
Junior Member
i am a problem from my c++ Sad
Re: No Console Output (MinGW, CDT) [message #1088012 is a reply to message #648408] Fri, 16 August 2013 12:51 Go to previous messageGo to next message
jose lima is currently offline jose limaFriend
Messages: 1
Registered: August 2013
Junior Member
THIS WORKED! Very Happy thanks Bran!

I printed in debug mode but not in dev mode in the console. Eclipse Standard 4.3, JAva JRE 64 bits, 64 windows.
icon14.gif  Re: No Console Output (MinGW, CDT) [message #1463577 is a reply to message #647424] Thu, 06 November 2014 18:09 Go to previous messageGo to next message
Alex jimenez is currently offline Alex jimenezFriend
Messages: 1
Registered: November 2014
Junior Member
Thanks, It worked.
Re: No Console Output (MinGW, CDT) [message #1693301 is a reply to message #665166] Thu, 23 April 2015 04:46 Go to previous messageGo to next message
Rakshak Agrawal is currently offline Rakshak AgrawalFriend
Messages: 1
Registered: April 2015
Junior Member
This worked fine for me. Thanks a lot.

Changing path to c:\cygwin\bin.
Re: No Console Output (MinGW, CDT) [message #1726367 is a reply to message #630143] Fri, 11 March 2016 21:15 Go to previous messageGo to next message
Hristian Temp is currently offline Hristian TempFriend
Messages: 3
Registered: March 2016
Junior Member
You already had Java 32-bit installed. I tried it as you mentioned, 32-bit eclipse with only 64-bit java, and I got an error.
Re: No Console Output (MinGW, CDT) [message #1751439 is a reply to message #629872] Tue, 10 January 2017 11:38 Go to previous messageGo to next message
Wen Yang Wu is currently offline Wen Yang WuFriend
Messages: 1
Registered: January 2017
Junior Member
Your output is being buffered. You have 4 options:

1.explicit flush

fflush after each write to profit from the buffer and still enforce the desiredbehavior/display explicitly.
fflush( stdout );


2.have the buffer only buffer lines-wise

useful for when you know that it is enough to print only complete lines
setlinebuf(stdout);


3.disable the buffer
setbuf(stdout, NULL);


4.disable buffering in your console through what ever options menu it provides

Re: No Console Output (MinGW, CDT) [message #1766183 is a reply to message #648408] Sat, 17 June 2017 02:13 Go to previous messageGo to next message
Biswajit Roy is currently offline Biswajit RoyFriend
Messages: 1
Registered: June 2017
Junior Member
adding the -static to the C++ Linker worked for me..thanks for the tip Bran
Project Properties -> C/C++ Build -> Settings -> Tool Settings -> MinGW C++ Linker
Re: No Console Output (MinGW, CDT) [message #1793384 is a reply to message #629872] Tue, 07 August 2018 08:09 Go to previous messageGo to next message
Tom Koller is currently offline Tom KollerFriend
Messages: 3
Registered: August 2018
Junior Member
Rightclick Project -> Debug As -> Debug Configuration -> Common -> ticking Allocate Console(Necessary for Input)

made the console working again for me
Re: No Console Output (MinGW, CDT) [message #1832993 is a reply to message #629932] Wed, 30 September 2020 12:33 Go to previous messageGo to next message
Eric Wills is currently offline Eric WillsFriend
Messages: 4
Registered: September 2020
Junior Member
Hi!
32 bit is no longer relevant. It's better to always use 64 bits.
Describe your problem in more detail.


Business before pleasure
Cheap Essay Writing Service


Re: No Console Output (MinGW, CDT) [message #1837239 is a reply to message #629872] Mon, 25 January 2021 17:39 Go to previous messageGo to next message
Antony Francis is currently offline Antony FrancisFriend
Messages: 2
Registered: January 2021
Junior Member
Hi , I also get this same issue , but now i got the correct method to get the console output with out change any settings ........
It is,
After the declaration statement need to add this given below:
setbuf(stdout,NULL);



THIS WILL WORK.....

[Updated on: Mon, 25 January 2021 17:42]

Report message to a moderator

Re: No Console Output (MinGW, CDT) [message #1838273 is a reply to message #1837239] Sat, 20 February 2021 05:16 Go to previous messageGo to next message
Ceyung Goe is currently offline Ceyung GoeFriend
Messages: 1
Registered: February 2021
Junior Member
This works for me. Thanks....
Re: No Console Output (MinGW, CDT) [message #1838403 is a reply to message #1838273] Wed, 24 February 2021 11:09 Go to previous messageGo to next message
Pr Nico is currently offline Pr NicoFriend
Messages: 23
Registered: February 2021
Junior Member
Worked for me
Re: No Console Output (MinGW, CDT) [message #1838851 is a reply to message #1838403] Sat, 06 March 2021 16:12 Go to previous message
bhenmia0 bhenmia0 is currently offline bhenmia0 bhenmia0Friend
Messages: 1
Registered: March 2021
Junior Member
I am using 32-bit desktop and 64-bit laptop (with projects synchronized between these 2 machines).

Running C Hello world on 32-bit produces outputs as it sould. Running the same program on 64-bit produces no output whatsoever.

mobdro

[Updated on: Sat, 18 September 2021 08:33]

Report message to a moderator

Previous Topic:DEBUGGER EXE
Next Topic:Couldn't build in eclipse by "gcc-arm-none-eabi-10-2020-q4-major-win32"
Goto Forum:
  


Current Time: Wed Dec 04 15:46:33 GMT 2024

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

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

Back to the top