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
> [email protected]
> http://lists.trolltech.com/mailman/listinfo/qt-creator
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator