Stderr.txt output using Visual Studio

I am trying to look at some of the output that the testdraw2.c test app
sends to stderr.txt, but I never see the file get created.

This used to work under SDL 1.2.x, but for some reason neither stdout.txt
nor stderr.txt are created using SDL 1.3.x

I looked thru the newsgroup messages and saw some old posts about this, but
couldn’t find a solution.

I am building the DEBUG version, so by default STDIO should be enabled since
NO_STDIO_REDIRECT is not defined.

What am I doing wrong? Has anyone using Visual Studio and SDL 1.3 gotten
the stderr.txt output to work?

Thanks,

Ken Rogoway

I haven’t tried getting the stderr.txt or stdout.txt files to be
generated on 1.3, but testdraw2.c only has 2 instances of printf
(well, 1 printf and 1 fprintf). Shouldn’t be too difficult to change
them, unless you’re trying to use an existing testdraw2.exe with your
own SDL.dll.

FILE *stderr2;
stderr2 = fopen(“stderr.txt”, “w”);
// stuff
fprintf(stderr2, “blah\n”);
// stuff
fclose(stderr2);On Mon, Jun 28, 2010 at 3:33 AM, Ken Rogoway wrote:

I am trying to look at some of the output that the testdraw2.c test app
sends to stderr.txt, but I never see the file get created.

This used to work under SDL 1.2.x, but for some reason neither stdout.txt
nor stderr.txt are created using SDL 1.3.x

I looked thru the newsgroup messages and saw some old posts about this, but
couldn?t find a solution.

I am building the DEBUG version, so by default STDIO should be enabled since
NO_STDIO_REDIRECT is not defined.

What am I doing wrong?? Has anyone using Visual Studio and SDL 1.3 gotten
the stderr.txt output to work?

Thanks,

Ken Rogoway


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Testdraw2.c uses common.c which has support for dumping all the render
options. Since I am trying to track down why my use of SDL_RenderFillRect()
isn’t working, I thought I would have it dump the render options used by the
test program which does work. If you look in common.c, there are a LOT of
places where it uses stderr.txt

It is easy enough to replace all occurrences in both files with a FILE * to
a global that I open at startup. I was really just trying to figure out why
the std*.txt files weren’t working by default.

Thanksm

Ken> ----- Original Message -----

From: sdl-bounces@lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of Justin Coleman
Sent: Monday, June 28, 2010 3:37 PM
To: SDL Development List
Subject: Re: [SDL] stderr.txt output using Visual Studio

I haven’t tried getting the stderr.txt or stdout.txt files to be
generated on 1.3, but testdraw2.c only has 2 instances of printf
(well, 1 printf and 1 fprintf). Shouldn’t be too difficult to change
them, unless you’re trying to use an existing testdraw2.exe with your
own SDL.dll.

FILE *stderr2;
stderr2 = fopen(“stderr.txt”, “w”);
// stuff
fprintf(stderr2, “blah\n”);
// stuff
fclose(stderr2);

On Mon, Jun 28, 2010 at 3:33 AM, Ken Rogoway wrote:

I am trying to look at some of the output that the testdraw2.c test app
sends to stderr.txt, but I never see the file get created.

This used to work under SDL 1.2.x, but for some reason neither stdout.txt
nor stderr.txt are created using SDL 1.3.x

I looked thru the newsgroup messages and saw some old posts about this,
but
couldn?t find a solution.

I am building the DEBUG version, so by default STDIO should be enabled
since
NO_STDIO_REDIRECT is not defined.

What am I doing wrong?? Has anyone using Visual Studio and SDL 1.3 gotten
the stderr.txt output to work?

Thanks,

Ken Rogoway


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

It appears the redirect code has been completely excised from
SDL_win32_main.c . IIRC, this was intentional, although I don’t recall
the reasoning. It might be possible to copy the relevant code from the
1.2.x version of that file?On Mon, Jun 28, 2010 at 4:51 PM, Ken Rogoway wrote:

Testdraw2.c uses common.c which has support for dumping all the render
options. ?Since I am trying to track down why my use of SDL_RenderFillRect()
isn’t working, I thought I would have it dump the render options used by the
test program which does work. ?If you look in common.c, there are a LOT of
places where it uses stderr.txt

It is easy enough to replace all occurrences in both files with a FILE * to
a global that I open at startup. ?I was really just trying to figure out why
the std*.txt files weren’t working by default.

Thanksm

Ken

-----Original Message-----
From: sdl-bounces at lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of Justin Coleman
Sent: Monday, June 28, 2010 3:37 PM
To: SDL Development List
Subject: Re: [SDL] stderr.txt output using Visual Studio

I haven’t tried getting the stderr.txt or stdout.txt files to be
generated on 1.3, but testdraw2.c only has 2 instances of printf
(well, 1 printf and 1 fprintf). Shouldn’t be too difficult to change
them, unless you’re trying to use an existing testdraw2.exe with your
own SDL.dll.

FILE *stderr2;
stderr2 = fopen(“stderr.txt”, “w”);
// stuff
fprintf(stderr2, “blah\n”);
// stuff
fclose(stderr2);

On Mon, Jun 28, 2010 at 3:33 AM, Ken Rogoway wrote:

I am trying to look at some of the output that the testdraw2.c test app
sends to stderr.txt, but I never see the file get created.

This used to work under SDL 1.2.x, but for some reason neither stdout.txt
nor stderr.txt are created using SDL 1.3.x

I looked thru the newsgroup messages and saw some old posts about this,
but
couldn?t find a solution.

I am building the DEBUG version, so by default STDIO should be enabled
since
NO_STDIO_REDIRECT is not defined.

What am I doing wrong?? Has anyone using Visual Studio and SDL 1.3 gotten
the stderr.txt output to work?

Thanks,

Ken Rogoway


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Sounds like a plan! I’m surprised it was removed since it could have easily
just been #ifdef’d based on the #define.

Thanks Justin.

Ken> ----- Original Message -----

From: sdl-bounces@lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of Justin Coleman
Sent: Monday, June 28, 2010 4:15 PM
To: SDL Development List
Subject: Re: [SDL] stderr.txt output using Visual Studio

It appears the redirect code has been completely excised from
SDL_win32_main.c . IIRC, this was intentional, although I don’t recall
the reasoning. It might be possible to copy the relevant code from the
1.2.x version of that file?

On Mon, Jun 28, 2010 at 4:51 PM, Ken Rogoway wrote:

Testdraw2.c uses common.c which has support for dumping all the render
options. ?Since I am trying to track down why my use of
SDL_RenderFillRect()
isn’t working, I thought I would have it dump the render options used by
the
test program which does work. ?If you look in common.c, there are a LOT of
places where it uses stderr.txt

It is easy enough to replace all occurrences in both files with a FILE *
to
a global that I open at startup. ?I was really just trying to figure out
why
the std*.txt files weren’t working by default.

Thanksm

Ken

-----Original Message-----
From: sdl-bounces at lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org]
On
Behalf Of Justin Coleman
Sent: Monday, June 28, 2010 3:37 PM
To: SDL Development List
Subject: Re: [SDL] stderr.txt output using Visual Studio

I haven’t tried getting the stderr.txt or stdout.txt files to be
generated on 1.3, but testdraw2.c only has 2 instances of printf
(well, 1 printf and 1 fprintf). Shouldn’t be too difficult to change
them, unless you’re trying to use an existing testdraw2.exe with your
own SDL.dll.

FILE *stderr2;
stderr2 = fopen(“stderr.txt”, “w”);
// stuff
fprintf(stderr2, “blah\n”);
// stuff
fclose(stderr2);

On Mon, Jun 28, 2010 at 3:33 AM, Ken Rogoway wrote:

I am trying to look at some of the output that the testdraw2.c test app
sends to stderr.txt, but I never see the file get created.

This used to work under SDL 1.2.x, but for some reason neither stdout.txt
nor stderr.txt are created using SDL 1.3.x

I looked thru the newsgroup messages and saw some old posts about this,
but
couldn?t find a solution.

I am building the DEBUG version, so by default STDIO should be enabled
since
NO_STDIO_REDIRECT is not defined.

What am I doing wrong?? Has anyone using Visual Studio and SDL 1.3 gotten
the stderr.txt output to work?

Thanks,

Ken Rogoway


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org