[Qt-interest] stdout in a Visual Studio compiled GUI application

Mike Inman mangocats at gmail.com
Thu Apr 30 19:40:21 CEST 2009


Hi,

I have a GUI app that has a little bit of self-test diagnostics built
into it. When building/running/testing under Linux, the app is called
repeatedly from a bash script and the diagnostics do their output to
stdout (printf, etc.) piped to log files.

I'd like to build something similar to work with the Visual Studio 2008
compiler, called from a batch file, output piped to log files, etc.
Unfortunately, stdout seems to be piping to a black hole unless I add
console to the .pro file, and I don't want a console window to open when
the app opens (basically, I want it to function like it does under
Linux, where the stdout will be seen _if_ the app was launched from a
command line, and is invisible otherwise, actually, otherwise doesn't
matter because nothing is sent to stdout if the app is functioning
normally.)

So, is there a convenient mechanism that works in both environments?  I
could switch everything over to output to dedicated files, but that's
not very convenient in the bash script world....

Thanks,





More information about the Qt-interest-old mailing list