No console window anymore?


I’m switching to OF 0.10.0, QtCreator 4.6.1 (Windows 7)

There are great improvements !

But I have a problem with the console window: when I start an .exe from the exporer, I have no console window. This can be really nice, but now I want to read the app output (cout or ofLog). If I start the same .exe from the command line, I can’t read them neither. I only see them in the QtCreator output panel.

I’ve found nothing about that in the documentation nor in the changelog. I wonder if there is something I can do to retrieve the console window when I need it.

Thanks, and bravo to all the contributors of this release :slight_smile:

oh that’s interesting.
What are you using to print?
Did you use something like this?


If that does not work, my guess is that QtCreator must be creating a non-console application by default. If that is the case, could you try to add this in your .pro file:

CONFIG += console

Let us know, Thanks!

Thanks Jordi for your answer (and sorry for my late reply, I was reaaaaaally busy :slight_smile: )

ofLogError() << "aaa";
or ofLogNotice() << "aaa";
or cout << "aaa" << endl;

When I run the app from QtCreator (Ctrl+R) I can read the messages in the “Application output” panel.

When I double-click the app.exe I have no console window at all.

When I start the app.exe from a DOS console, the messages doesn’t appear. There is another strange thing: the console don’t wait for the app to close, and I can use it for other commands:

I just tried to add theses lines, just in case, but noting change.

This seems right, but I haven’t find any .pro file anywhere. Does this file exists with windows too ? (OF 0.10.0, QtCreator 4.6.1, Windows 7)

Oh you are right! Openframeworks is using QBS build system. Sorry for misleading you!
There must be an equivalent option in the qbs file. Sorry i don’t know much about qbs files but you could have a look at here:

No problem of course :smiley:

I had a look to this documentation and… this is too much to learn for me now to solve this little problem. If anyone else have a solution, you’re welcome !

Do you think I must open a bug report for this ?

I just create a bug report:

@arturo pointed me that this is not a bug but a feature. Here’s how to add the console window:

So I try to add an option in the QtCreator wizard, a check box which allow to enable or not the console window. Seems like it works:

1 Like