Console output

Hi everyone,

I’m not really new to libSDL but i ran into a problem.
I’m using wingwin/msys with sdl on windows and i wonder how i can get a
printf to reach the console.
Once the program launched there is no way a printf to stdout or stderr
does anything. I suppose this is a feature of sdl before SDL_main is called.
Is it possible the redirect the stdout and stderr to what they was
before by a specific function call?

Thanx in advance

i believe for windows you have to give your linker something like
/SUBSYSTEM:CONSOLE rather than /SUBSYSTEM:WINDOWS in order to create a
console window. under win32 SDL routes stdin,stdout & stderr to stdin.txt,
stdout.txt & stderr.txt respectively if there is no console window
available. I think you would need to edit and re-compile the library if you
wanted something else.

“fabrice” <fabrice.ilponse at lip6.fr> wrote in message
news:3D518484.3030509 at lip6.fr

Hi everyone,

I’m not really new to libSDL but i ran into a problem.
I’m using wingwin/msys with sdl on windows and i wonder how i can get a
printf to reach the console.
Once the program launched there is no way a printf to stdout or stderr
does anything. I suppose this is a feature of sdl before SDL_main is
called.> Is it possible the redirect the stdout and stderr to what they was
before by a specific function call?

Thanx in advance