Stderr.txt and stdout.txt?!?!

where are those coming from?.. cant get rid off them!!! even in release…

Any way i can just exorciced those from my build? (VS .Net)

Golgoth

THX

Golgoth wrote:

where are those coming from?.. cant get rid off them!!! even in release…

Any way i can just exorciced those from my build? (VS .Net)

they come from SDLmain.lib you can always take SDLmain’s source and alter it…to make your own SDLmain

or you can recompile sdl and configure the redirection out. of course that’s not as easy to do when using MSVC++.

in any case, it comes from SDLmain.

-LIM-

Jonathan Atkins wrote:

Golgoth wrote:

where are those coming from?.. cant get rid off them!!! even in
release…
Any way i can just exorciced those from my build? (VS .Net)

they come from SDLmain.lib you can always take SDLmain’s source and
alter it…to make your own SDLmain

or you can recompile sdl and configure the redirection out. of course
that’s not as easy to do when using MSVC++.

in any case, it comes from SDLmain.

-LIM-


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

you could try

fclose(stderr);
fclose(stdout);

in main.

  • Tom

Jonathan Atkins <jcatki jonatkins.org> writes:

Golgoth wrote:

where are those coming from?.. cant get rid off them!!! even in release…

Any way i can just exorciced those from my build? (VS .Net)

they come from SDLmain.lib you can always take SDLmain’s source and alter
it…to make your own SDLmain

O my god… I hope his kidding… right!!! please, please, please…

or you can recompile sdl and configure the redirection out. of course that’s
not as easy to do when using MSVC++.

why SDL team decided to harcode such a feature?!?! so everyone using the sdl
lib have those txt ghost files come and go all the time?> in any case, it comes from SDLmain.

-LIM-

Golgoth wrote:

it…to make your own SDLmain
O my god… I hope his kidding… right!!! please, please, please…

Why kidding? Look at what SDLmain.lib is: A fairly simple WinMain
replacement (it’s used to handle platform specific initializations in a
clean way).

Just include SDL_main.c in your project and edit it to your needs, no
need to recompile the library at all.

why SDL team decided to harcode such a feature?!?! so everyone using the sdl
lib have those txt ghost files come and go all the time?

SDLmain is not SDL, it’s always statically linked, you can modify it as
you like without licence restrictions.

Bye,
Gabry

> why SDL team decided to harcode such a feature?!?! so everyone using the sdl > lib have those txt ghost files come and go all the time?

I think stdout.txt only appears if you try to write something to stdout.
stderr.txt only appears if you try to write something to stderr.

The easiest solution is to rethink why you’re doing things like
’printf(“blah”);’ and ‘fprintf(stderr, “Error: Can’t open file!”);’,
when there’s nowhere for them to be displayed. (SDLmain(?)'s putting them
in those .txt files is probably the best it can do :^) )

-bill!On Tue, Sep 28, 2004 at 04:06:17PM +0000, Golgoth wrote:

Golgoth wrote:

Jonathan Atkins <jcatki jonatkins.org> writes:

Golgoth wrote:

where are those coming from?.. cant get rid off them!!! even in release…

Any way i can just exorciced those from my build? (VS .Net)

they come from SDLmain.lib you can always take SDLmain’s source and alter

it…to make your own SDLmain

O my god… I hope his kidding… right!!! please, please, please…

or you can recompile sdl and configure the redirection out. of course that’s

not as easy to do when using MSVC++.

why SDL team decided to harcode such a feature?!?! so everyone using the sdl
lib have those txt ghost files come and go all the time?

Last time I compiled SDL under visual C (that was with visual C 6), I
could choose between a debug and a release build (somewhere in a
compilation menu). And IIRC, the release build didn’t have the
redirect-to-std*.txt feature.

./configure --disable-stdio-redirect will do the same for the
cygwin/mingw build.

Having this redirection is a great feature for debugging, btw.

Stephane

Gabriele Greco <gabriele.greco darts.it> writes:

Just include SDL_main.c in your project and edit it to your needs, no
need to recompile the library at all.

Ok there is some kind of misunderstanding here… we re using the compile 1.2.7
release sdl.lib… super light, and we like it that way… now… i ve
dowloaded the source code… I ve copied the SDL_Main.c (not sure its the right
file to edtit tho)… in my project folder… add it to my solution… edit it
and… not surprisingly, it wont be that easy… so now… what do I do?

do we have to link the new SDL source codes lib and includes to our project?
still need the lib and includes from de compile version compiled version?

it actualy looking for these files…

#include <Dialogs.h>
#include <Fonts.h>
#include <Events.h>
#include <Resources.h>
#include <Folders.h>

I cant find them…

can someone help me out?

THX


I think stdout.txt only appears if you try to write something to stdout.
stderr.txt only appears if you try to write something to stderr.

The easiest solution is to rethink why you’re doing things like
’printf(“blah”);’ and ‘fprintf(stderr, “Error: Can’t open file!”);’,
when there’s nowhere for them to be displayed. (SDLmain(?)'s putting them
in those .txt files is probably the best it can do :^) )

./configure --disable-stdio-redirect will do the same for the
cygwin/mingw build.

Huh?? is this the easy way i m looking for??? :wink:

Having this redirection is a great feature for debugging, btw.

its probably marvellous i m sure… but i dont need them… especialy in
release…> Stephane

Then why are you writing to stdout/stderr in the first place?

–JamesOn Tue, 28 Sep 2004 17:23:00 +0000 (UTC), Golgoth wrote:

Having this redirection is a great feature for debugging, btw.

its probably marvellous i m sure… but i dont need them… especialy in
release…

James Arthur <teamonkey gmail.com> writes:

Then why are you writing to stdout/stderr in the first place?

… I dont… if I do I m not aware of… is this a VS project properties???

ok tell us this

when you run your program it makes the stderr.txt and stdout.txt files but
as soon as your program exits they are deleted right?> ----- Original Message -----

From: neosettlers@sympatico.ca (Golgoth)
To:
Sent: Tuesday, September 28, 2004 1:18 PM
Subject: [SDL] Re: stderr.txt and stdout.txt?!?!!

James Arthur <teamonkey gmail.com> writes:

Then why are you writing to stdout/stderr in the first place?

… I dont… if I do I m not aware of… is this a VS project
properties???


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

Alan Wolfe <atrix2 cox.net> writes:

ok tell us this

exacly!

some times they are not deleted for some reasons… but they are still empty…

if your program crashes they dont get deleted so im guessing sometimes when
your program “exits” it’s crashing at the last moment.

when this happens is there anything in stderr.txt?> ----- Original Message -----

From: neosettlers@sympatico.ca (Golgoth)
To:
Sent: Tuesday, September 28, 2004 2:25 PM
Subject: [SDL] Re: stderr.txt and stdout.txt?!?!!

Alan Wolfe <atrix2 cox.net> writes:

ok tell us this

exacly!

some times they are not deleted for some reasons… but they are still
empty…


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

if your program crashes they dont get deleted so im guessing sometimes when
your program “exits” it’s crashing at the last moment.

yes that happened indeed! :wink:

when this happens is there anything in stderr.txt?

maybe it did but, but I doubt it… i never saw anything in there each time i
ve looked…