[Qt-creator] printf() with Qt Creator?
Bruno Matos
bruno.matos at gmail.com
Sat Apr 24 23:21:30 CEST 2010
Strange, as was expected, works for me. Could you please attach the
console output of your compiler. And give the information about your
environment.
Thank you.
On 2010/04/24, at 21:25, Danny Price wrote:
> Definitely an issue here. I created a C++ project and added CONFIG
> += console to the pro file. The following does NOT print to the
> console until after main returns (as shown with a breakpoint)
>
> #include <iostream>
> int main()
> {
> std::cout << "test";
> return 0;
> }
>
>
> However if I add cout.flush() before the return, the output appears:
>
> #include <iostream>
> int main()
> {
> std::cout << "test";
> std::cout.flush();
> return 0;
> }
>
> The CONFIG += console line appears to have NO EFFECT. This must be a
> recent regression because I'm sure this used to work. I've not been
> able to get it to work at all with <stdio.h> as I think it lacks a
> standard function to flush the buffer.
>
>
> On 15 Apr 2010, at 08:47, Brad Hubbard wrote:
>
>> Berk Demirkır wrote:
>>> A simple program output that prints a lot via printf don't show on
>>> Application Output. But when i close this application output
>>> shows. Strange issue...
>>>
>> Sounds like the output buffer is not being flushed.
>>
>> Cheers,
>> Brad
>> _______________________________________________
>> Qt-creator mailing list
>> Qt-creator at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-creator
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
--
Bruno Matos
bruno.matos at gmail.com
More information about the Qt-creator-old
mailing list