[SDL] annoying stdio redirect

Michael Summers wfrobozz at gmail.com
Thu Jul 12 05:19:05 PDT 2007


Hi,

I've been trying to code up a small tech demo for geometry shaders for the past
few hours, but I'm running into a bit of a snag. The program is supposed to be
command-line and I'd like stdio to not redirect into a text file but rather into
the current command prompt.

So I tried using freopen("CON", "wb", stdout). It didn't redirect to stdout.txt,
but it didn't use the command prompt either. Then I tried compiling from scratch
with --disable-stdio-redirect passed to configure. Once again, didn't it didn't
use stdio.txt, but it didn't use the command prompt either.

Commenting out everything related to SDL and the #include <SDL.h> part restores
output to the command prompt though. :(

Source code: http://www.nomorepasting.com/getpaste.php?pasteid=1305

Any ideas?
Michael Summers



More information about the SDL mailing list