cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

bubu
Adept II

printf extension on win32 app

From the docs

 

Built-in function:
printf(__constant char * restrict format, …
This function writes output to the stdout stream associated with the
host application.

 

Problem: My app is a windowed win32 app, not a ms-dos console app.

How can I output the printf statements to the Visual Studios's DebugOutput console?

0 Likes
2 Replies

you need to redirect stdout to the the console via the Win32 API I believe.
0 Likes

I've found aworkaround.I do this from the ms-dos console and works:

 

c:\> MyApp.exe > log.txt

c:\>

The command finishes immediatly popping my app's window but the printf statements are correctly saved to the log file.

 

 

0 Likes