I’m now porting a multimedia app to SDL 1.2.9 (using binary
distribution from the site). I can now run and get some basic
functionality. FYI it took about 6 hrs to get my custom makefiles /
link build correct under mingw:
gcc … … -o my.exe -Wl,-Bdynamic -lmingw32 -lSDLmain -lSDL -mwindows
I’m using printf extensively for debug and notice stdout.txt and
stderr.txt are created when I run my app. However output to
stdout.txt is not flushed per-line as it should be - I checked the
source and buffering should should be per-line?
setvbuf(stdout, NULL, _IOLBF, BUFSIZ);
However, the behavior I see, is that stdout.txt is only written when
the app exits successfully. If the app is killed or hangs then killed
or etc, then file size of stdout.txt is zero. Not so good for debug.
Note, stderr seems OK - no buffering. So now I am only using stderr.
Is this a mingw issue?