Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print to C++Builder output window

I have a C++Builder 2010 project and want to add tests to it. So, instead of pausing the output of my console window to read the outcome of the tests, I want to print the same information to the Output Window in C++Builder (not in the Event Log).

So OutputDebugString is not an option for me. Is there some specific way to either redirect console output to the Output Window or to print directly there?

C++ Builder 2010 output window

like image 627
riot_starter Avatar asked Feb 22 '12 13:02

riot_starter


2 Answers

You can simply define a Post-build event in your Project Options to run your executable. Its console output will automatically be included in Output messages.

like image 143
Ondrej Kelle Avatar answered Nov 20 '22 13:11

Ondrej Kelle


That window is for the output of the compilation process. It's not what you are looking for. You want to generate output whilst the program runs. I'd use the console or OutputDebugString or similar and I can't understand what you have against those options.

like image 1
David Heffernan Avatar answered Nov 20 '22 13:11

David Heffernan