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

Marco Borm qt-lists at retrodesignfan.eu
Thu Apr 30 20:10:47 CEST 2009


Hi Mike,

I don't think you can attach a GUI application to a existing 
console-window or start it "within".
In the past I've done something similar by creating my own console 
windows if a parameter "--console" was given to the application.
Please read this for informations how to create a console windows:
http://msdn.microsoft.com/en-us/library/ms682528(VS.85).aspx


Greetings,
Marco

Mike Inman wrote:
> 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,
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>   




More information about the Qt-interest-old mailing list