Please note this is not C++ code and I'm not developing a Qt app.
I mostly develop embedded code and someone has knocked up a neat LCD emulator so we can write quite a lot of the code independent of the target platform (which will be embedded ARM). He's given me a gcc make file and C files which I have imported into Qt creator on a Linux desktop. It can be compiled for different platforms just with some gcc options. So although it will eventually work on an STM32 for the moment I can write code on a computer. He does it on Windows, but I'm doing it on Linux.
I'd like to do some printf commands to spit some debug data out which is something I'd never normally do on embedded developments as the IDE I use has such great facilities for setting breakpoints and looking at registers.
I should say that I can compile a line like this:
printf("Selected Index is %d, Highlighted Position is %d, Index Start is %d \n",selected_index,highlight_position,index_start);
But I'm seeing no output in the Debugger Console.
If I'm using Qt creator to write GUIs on the rare occasions I want to do print out data on the fly I'll just write to a debug window.
If I want to do a printf for a bog standard C program using Qt creator, how can I get printf to spit out data to the debugger console? In fact can it be done?
I can't use the usual Qdebug facility as I am not using any sort of Qt framework. I'm simply using Qt as an IDE and debugger for ARM C code.
As written in a comment (which I wrote as a comment because I do not have QT here and so cannot check it, nor have I used in the past months, so I was not sure), there are some solutions you can try:
According to your reply, printing to STDERR shows output on the application output window, so it works also for plain C. I thought that also the STDOUT stream should have been redirected to that window, though