Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Console Bug(Printf doesn´t put out my content)
Console Bug [message #902233] Thu, 16 August 2012 13:21 Go to next message
Patrick Kuckelsberg is currently offline Patrick KuckelsbergFriend
Messages: 1
Registered: August 2012
Junior Member
Hello Community,

this is my first cpp project and it starts very bad.

I can´t see the output in the console.

my Code:

#include <stdio.h>

int main(){

	setvbuf(stdout, NULL, _IONBF, 0);
	setvbuf(stderr, NULL, _IONBF, 0);

	printf("Hello World");

	return 0;

}


other tutorials like:
http://www.eclipse.org/forums/index.php?t=msg&th=197552&start=0&S=2a2b64e1f1404705c0214976bd477428

doesn´t help either.

Please help.

My System:

First setup:
Windows 64-bit,
eclipse 64-bit,
Java 64-bit,
mingw

second setup:
Windows 64-bit,
eclipse 32-bit,
java 32-bit,
mingw
Re: Console Bug [message #902418 is a reply to message #902233] Fri, 17 August 2012 14:14 Go to previous messageGo to next message
Nick Schweyer is currently offline Nick SchweyerFriend
Messages: 175
Registered: July 2009
Senior Member
hi,

in the run configuration (menue Run | Run configurations ..) the hook shall be set at "connect process input & output to a terminal".
I am using Eclipse with Linux. Maybe the menue items are somewhat different. But look for a text like above.


Niko

Eclipse-CDT Version: 2019-12 (4.14.0), Win10 64bit
Re: Console Bug [message #902554 is a reply to message #902233] Sat, 18 August 2012 11:32 Go to previous message
Klaus km is currently offline Klaus kmFriend
Messages: 142
Registered: November 2011
Senior Member
Windows, C++ and MinGW:

MinGW creates code, that needs the lib libgcc_s_dw2-1.dll during runtime.

If you call the generated exe file from the command-line, you will see the "DLL" missing error!

So add the path to MinGW (maybe C:\MinGW\bin) to the environment variable Path and than try again.

regards,
Klaus


Previous Topic:<iostream> The word '' is not correctly spelled
Next Topic:Tooltips Missing
Goto Forum:
  


Current Time: Fri Oct 04 02:50:56 GMT 2024

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

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

Back to the top