[Qt-interest] stdout in a Visual Studio compiled GUI application
Mike Inman
mangocats at gmail.com
Fri May 1 17:52:05 CEST 2009
O.K. - here's a related question, when using Qt Creator (in release
mode), the Application Output window is able to display error messages
from Qt, such as:
QFileSystemWatcher:FindNextChangeNotification failed (The specified
network name is not longer available.)
QFileSystemWatcher:FindNextChangeNotification failed (The specified
network name is not longer available.)
QFileSystemWatcher:FindNextChangeNotification failed (The specified
network name is not longer available.)
QFileSystemWatcher:FindNextChangeNotification failed (The specified
network name is not longer available.)
QFileSystemWatcher:FindNextChangeNotification failed (The specified
network name is not longer available.)
QFileSystemWatcher:FindNextChangeNotification failed (The handle is
invalid.)
so, what channel are these messages flowing through? stdout and stderr
don't show up here....
Mike
Marco Borm wrote:
> 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
>>
>>
>>
>
> _______________________________________________
> 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