Is it possible to redirect stdout within a Win32 GUI app to a file that it'll actually write something? and I mean without ommiting -mwindows on linking, or using > on calling the app.
I tried freopen() and dup2() on stdout to a file, but that seems to only work when the app is launched with a pipe command. Otherwise it seems the output is being witheld.
Win32 stdout redirection
Moderator: General Mods
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Win32 stdout redirection
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Nevermind, I figured it out.
Seems when compiling with -mwindows, stdout and friends no longer point at the appropriate file descriptor. Working with them via descriptor directly solves issues.
Seems when compiling with -mwindows, stdout and friends no longer point at the appropriate file descriptor. Working with them via descriptor directly solves issues.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding