Author Topic: Command Line Output  (Read 3325 times)

ModernTenshi04

  • Guest
Command Line Output
« on: November 07, 2006, 05:11:12 pm »
I've just installed Code::Blocks for the first time, and must say it looks to be a very nice IDE.  I have a small problem that I cannot seem to figure out though.  Up until now, I've been using a combination of jGrasp and the Borland 5.5 compiler to complete assignments in my c++ class.  After reading about the features of C::B I decided to check it out, as it seems to have a lot of the features I've come to enjoy with other IDEs (auto-complete for the most part).  However, when I go to run my code, I can't seem to get C::B to do so using the command console.  With jGrasp I'm used to running my code, and having all of my output displayed in a command console window so I can check everything, but I cannot seem to get C::B to do this at all.

Is it possible to have C::B output my code to a command line when I run it, and if so, how do I enable this?

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Command Line Output
« Reply #1 on: November 08, 2006, 05:38:04 am »
First off, mentioning which version of Code::Blocks you're running would increase your chances of getting relevant help. I'll assume that you're running a recent nightly build of Code::Blocks, as you should be for best results.

Chances are, you're either compiling your programs as GUI applications instead of console applications, or expecting your console applications to stay visible even after they've exited -- which Code::Blocks is kind enough not to do by default. In the Targets tab of your project properties, make sure that the Type is Console application; if you need the console window to remain visible even after your program exits, tick the "Pause when execution ends" checkbox.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)