• Advertisement

Archived

This topic is now archived and is closed to further replies.

How do I disable stderr.txt etc?

This topic is 5760 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When I run my Win32 application without a console window, it automatically generates 2 output files - even if Im not printing anything out. Is there a way I can disable this (using VC++)? Cheers

Share this post


Link to post
Share on other sites
Advertisement
I''ve not met that behaviour ''by default'' before.

What version of VC++ are you using ?
Are you using any library which could redirect your output ?

Always try to provide all relevant information.
"I have a problem" usually isn''t enough.

[Questions (STFW) | GDNet Start Here | GDNet Search | Forum FAQ | Google | Asking Smart Questions ]
[Docs (RTFM) | MSDN | SGI''s STL | OpenGL | File formats]
[C++ Must Haves (RTFS) | MinGW | Boost | Loki | FLTK | SDL ]

Stolen from Magmai Kai Holmlor, who held it from Oluseyi, who was inspired by Kylotan...

Share this post


Link to post
Share on other sites
This is strange...
Some function you use has to create these two files. I suggest following:
-delete the files
-step thru the code, and see wich portion (or better function) generates the files
-post this info here, so we can get a grip on the problem

As an alternative, you could open the files with a program that locks them (Excel, for example). Then run the code, in the hope that the function creating them will fail, so you will know where to look...

Forever trusting who we are
And nothing else matters
- Metallica

Share this post


Link to post
Share on other sites
Sorry, Im using VC++ 6.

I just create a standard Win32 Application Project.
Im using SDL and OpenGL, maybe SDL is doing something weird, but I doubt it. I commented out all my outputs but it just creates empty files.

I just figured that when you dont have a console window it defaults to opening error files, and I was just wandering if there was a way to switch this off.

Thanks

Share this post


Link to post
Share on other sites
Hmm, SDL indeed creates files to handle output to stdout and stderr.

However, the code for cleanup_output() in \src\main\win32\SDL_main.c says that it cleans them up when you shutdown SDL if they are empty.

Are you sure you shut SDL down properly ?

[Questions (STFW) | GDNet Start Here | GDNet Search | Forum FAQ | Google | Asking Smart Questions ]
[Docs (RTFM) | MSDN | SGI''s STL | OpenGL | File formats]
[C++ Must Haves (RTFS) | MinGW | Boost | Loki | FLTK | SDL ]

Stolen from Magmai Kai Holmlor, who held it from Oluseyi, who was inspired by Kylotan...

Share this post


Link to post
Share on other sites
Yeah I just discovered they were being created when I called SDL_Init().

They are cleaned up when you quit the application, I just noticed it when I ran the exe from my desktop and it looks a bit scrappy having files appearing there.

I guess its not such a problem, I was just wandering if there was a simple way to stop this...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Copy the SDLmain source file into your project (it''s in the public domain), and edit the initialization code. Those files aren''t created when you call SDL_Init, they''re created before your main starts executing.

Just read the source.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Fruny:
I''ll do my own experiment, but are you sure that they don''t get deleted if they aren''t empty?

I did the same trick of redirecting the output to a file because the two files were always being deleted and I wanted to read the information afterwards.

Share this post


Link to post
Share on other sites

  • Advertisement