Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Duncan on May 14, 2009, 06:47:46 am

Title: When using SDL I can't cout anything
Post by: Duncan on May 14, 2009, 06:47:46 am
Hi I'm using a Windows XP Machine with Code Blocks and the MinGW Compiler.

I've been using SDL for my graphical API lately but for some reason if, for debugging purposes, in my program I try to cout something:
cout << "Ball's X: " ball.x << endl;

I get no output in the console window.

Is there some option that I need to check.. or some other way to get this to work as desired... or is it an unfortunate reality?

Thanks!
Title: Re: When using SDL I can't cout anything
Post by: Jenna on May 14, 2009, 07:10:28 am
Searching the forum for "no console output" gave me this thread as first: http://forums.codeblocks.org/index.php/topic,10409.0.html (http://forums.codeblocks.org/index.php/topic,10409.0.html)

Most likely you have the same problem.

For the next time, please search the forum and/or the web first.
Title: Re: When using SDL I can't cout anything
Post by: thomas on May 14, 2009, 11:15:55 am
You get no console output for another reason, and that is because you use SDL. This library redirects standard output and standard error into files. Their documentation explains how to disable this feature (I don't remember, need to #define something...)
Title: Re: When using SDL I can't cout anything
Post by: cic.lemur on September 10, 2009, 07:34:10 am
This worked for me

http://www.libsdl.org/cgi/docwiki.cgi/FAQ_Console