2012/1/9 Tor Lillqvist <tml@iki.fi>:
I'll also try what Stephan suggested, i.e. if we can print to stdout in Windows, too.Note that one layer of silly wrapping could probably be dropped by using AttachConsole(ATTACH_PARENT_PROCESS) followed by freopen()ing stdout and stderr to CONOUT$. AttachConsole() is present on XP and later.
When I include windows.h in desktop/source/app/cmdlinehelp.cxx, it does not compile. Other headers conflict with windows.h. I created a wrapped function in a separate cxx file. It compiles, but it does not work as expected, nothing is written to console. Do you see the problem with the attached patch? BTW, as an alternative, I can open a help window on Windows that shows the relevant help page. Thanks, Andras
Attachment:
0001-print-help-to-stdout-on-Windows-does-not-work.patch
Description: Binary data