[SDL] stdout/stderr

Charles McGarvey onefriedrice at brokenzipper.com
Mon Nov 5 20:00:33 PST 2007


I'm sorry if this isn't strictly an SDL issue, but I have built my program 
using the following commands:

g++ -c -ggdb -UNDEBUG -Iinclude -Isrc -IC:\MinGW\include\SDL 
src\bz\file.cpp -
o src\bz\file.obj
--- snip other source files compiled the same as the first ---
g++ -ggdb -UNDEBUG -Iinclude -Isrc -IC:\MinGW\include\SDL -o project.exe 
src\
bz\file.obj -L.  -lmingw32 -lSDLmain -lSDL -lopengl32 -lglu32 -ll
ua5.1 -lm

This has worked well enough for me except that on Windows the stdout and 
stderr output gets rerouted to stdout.txt and stderr.txt respectively, even 
though a console is displayed along with the SDL window (nothing is ever 
printed to the console).  Output goes to the files even if I run it from a 
command line, and even if I run it thru gdb.  This isn't behavior that I 
expected, coming from Linux.  I'd rather output just go to the console so I 
can see it live because I use it for debugging.

Questions:  1. Is this normal Windows behavior?  2. How do I change it?

Thanks much,
chaz



More information about the SDL mailing list