1 Attachment(s)
Thread Problems (i think)
I can't understand why "Cout Test" did not printing. I think this is thread problem.
Re: Thread Problems (i think)
But you application doesn't use threads... Does the application output anything at all for you?
Re: Thread Problems (i think)
Quote:
Originally Posted by
wysota
But you application doesn't use threads... Does the application output anything at all for you?
i think signals and slots are using threads.
app output only via qDebug() or cerr.
Re: Thread Problems (i think)
Quote:
Originally Posted by
LMZ
i think signals and slots are using threads.
No, they are not.
Quote:
app output only via qDebug() or cerr.
What operating system are you using?
Re: Thread Problems (i think)
Ubuntu 7.04 Feisty
does this matter?
Re: Thread Problems (i think)
Does this output anything?
Code:
#include <iostream>
int main(int argc, char **argv){
std::cout << "TESTING" << std::endl;
}
Compile it using qmake please, just like you would for a regular Qt app.
Re: Thread Problems (i think)
Re: Thread Problems (i think)
Seems to be missing std::endl.
Re: Thread Problems (i think)
Quote:
Originally Posted by
jpn
Seems to be missing std::endl.
std::endl is not obligatory at all
Re: Thread Problems (i think)
cout works only on stdout, so you need to tell qmake this is a console app.
Therefore add CONFIG += debug console to the pro file.
In a GUI app you can try to output something to cerr. It might work.
Re: Thread Problems (i think)
Quote:
Originally Posted by
LMZ
std::endl is not obligatory at all
But lack of it prevents the output buffer from being flushed. Try adding it like J-P suggested.
Quote:
Originally Posted by
marcel
cout works only on stdout, so you need to tell qmake this is a console app.
Therefore add CONFIG += debug console to the pro file.
In a GUI app you can try to output something to cerr. It might work.
He's using Linux, so that's not the case here. That is why I asked about the OS he uses.
Re: Thread Problems (i think)
Quote:
Originally Posted by
jpn
Seems to be missing std::endl.
thanks a lot, it works!!!!