I am interested in printing the messages of the console in another application. Is there any way to redirect rt_printf messages?
You could use rt_fprintf() and print to a file (with the same syntax as fprintf()). If the file is a fifo, then your other program could open the fifo at the other end and read the messages! Alternatively, in the more generic context of inter-process communication, you could use the UdpClient class to send UDP packets to your other program.
It must be said that if you do not want to change your source code at all, you could also start the program from the terminal and use pipes and redirects as usual, e.g.:
./projectName | grep "log:" > logfile