Stdout output on console on windows

Hi

I’m using SDL for mingw (on Windows). I would like to have the output
drected to stdout to go straight to my console like it happens in
linux, and not in a file called stdout.txt. Is there a way for doing
this?

Thank you in advance,

Andre’

I think you will have to recompile the library; if you have msys installed
then just run

./configure --enable-stdio-redirect=no> ----- Original Message -----

From: sdl-admin@libsdl.org [mailto:sdl-admin at libsdl.org] On Behalf Of Andre’
Sent: Thursday, December 18, 2003 8:45 AM
To: sdl at libsdl.org
Subject: [SDL] stdout output on console on windows

Hi

I’m using SDL for mingw (on Windows). I would like to have the output
drected to stdout to go straight to my console like it happens in
linux, and not in a file called stdout.txt. Is there a way for doing
this?

Thank you in advance,

Andre’


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

How do I accomplish this using Borland’s 5.5 compiler? Is there an easier
way to redirect the stdio instead of having to recompile the source?

Thanks

“Brian Kropf” wrote in
news:000601c3c7ee$26060b20$0300a8c0 at cavortianville:> I think you will have to recompile the library; if you have msys

installed then just run

./configure --enable-stdio-redirect=no

Nope.

(It’s somewhat hard to do this at runtime, since the redirection happens
in SDL_main’s main function, before your main function is called–so
there’s no chance to pass SDL_main any flags.)On Sun, Dec 21, 2003 at 08:49:23PM +0000, Vivi Orunitia wrote:

How do I accomplish this using Borland’s 5.5 compiler? Is there an easier
way to redirect the stdio instead of having to recompile the source?


Glenn Maynard

Glenn Maynard <g_sdl at zewt.org> wrote in
news:20031222011446.GD7080 at zewt.org:

Nope.

(It’s somewhat hard to do this at runtime, since the redirection
happens in SDL_main’s main function, before your main function is
called–so there’s no chance to pass SDL_main any flags.)

I had a thought, what about providing the user w/ the option to toggle
stdio redirection on and off through use of preprocessors, like #define
for instance. For example, doing something like this:

#include
#define NSTDIO
#include “SDL.h”

int main(int, char *[])
{
//outputs to the normal console instead of stdio.txt
//since NSTDIO has been defined
std::cout << “stuff” << std::endl;
return 0;
}//main

or something to that effect. Would it be possible to implement something
like this into SDL? I imagine someone must have already made a similar
suggestion to this at some point during SDL’s development and lifetime.

Thanks