proposed solution for "#436 Output should be directed to the windows console"

Lubomir I. Ivanov neolit123 at gmail.com
Thu Mar 20 02:39:53 PDT 2014


On 19 March 2014 18:15, Dirk Hohndel <dirk at hohndel.org> wrote:
> On Wed, 2014-03-19 at 21:19 +0600, Farzana Raisa wrote:
>> I am not being able to cross compile on linux for windows. And I have
>> discussed about it in the list. That's why i couldn't compile it in
>> window. But i guess the problem will be solved if i use
>> fprintf(stderr, "") instead of printf("") in the function "static void
>> print_help()" and "static void print_version()" under the
>> subsurfacestartup.c file.
>
> No. Windows doesn't connect stderr or stdout for UI applications.
> So this won't help at all.
>

well, technically, the fact that stdout and stderr go into the abyss
for GUI apps, doesn't mean we *can't* pipe them where we want to.
i simply didn't understand the need for it. i guess i can be useful to
gather debug information from users, if instructed to pass an extra
argument.

1) we add the -win32console command line argument that is a NOP on
other platforms
2) users can add it when calling the exe from the terminal or from a
desktop shortcut
3) it pipes our output to a dedicated terminal (created on the fly) or
to the starting terminal process

a bit confused with the whole GSOC idea thing and if a student should
take this, but i can certainly write this one quickly...
around 30 LOC of a patch.

lubomir
--


More information about the subsurface mailing list