Author Topic: When using SDL I can't cout anything  (Read 7643 times)

Duncan

  • Guest
When using SDL I can't cout anything
« 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!

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: When using SDL I can't cout anything
« Reply #1 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

Most likely you have the same problem.

For the next time, please search the forum and/or the web first.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: When using SDL I can't cout anything
« Reply #2 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...)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

cic.lemur

  • Guest
Re: When using SDL I can't cout anything
« Reply #3 on: September 10, 2009, 07:34:10 am »