GP2X Windows Build Doesn't Log To Stdout.txt?


Gadget

Member
Joined
May 16, 2006
Messages
247
Hi,

Don't know if anyone can help with this... My game runs fine on GP2X and Windows, but in Windows it creates an emtpy stdout.txt and stderr.txt but never logs anything to either? Is there something different I need to do relating to printf on Windows?

Thanks
 
First are you acually trying to write anything to them ?
If you want the text to be specificly(sp?) written to the file stdout, use fprintf instead, as (correct me if im wrong here) printf is acually trying to write to the default data stream (or something like that) which is usually a command promt in windows, the compiler should be redrecting this to a file named stdout, but might not do this depending on your settings.

to write to the stdout with fprintf instead of printf:
fprintf(stdout, "your message here\n");
stdout is a simple predefined FILE struct (it is a struct isn't it?).

Edit: some tech errors
 
if your using printf or fprintf (stdout, etc, then try this from a windows command prompt:

prog >stdout.txt 2>stderr.txt

Or fopen from within your program and fprintf.

Personally, I prefer live output (ie, as the program runs) rather than logging to a file.
 
Back
Top