User forums > Using Code::Blocks

help: no console in newer daily builds... or 64-bit ubuntu 12.04

<< < (2/3) > >>

ouch:
Hmm... Well maybe your program is finishing before the window even appears. I've seen that happen before. You might want to add a delay or pause in your code. Try looking at the process manager or run "top" in a terminal to see if the thing even starts. I would also try running a debugger on your code and see if something odd pops up.

bootstrap:

--- Quote from: ouch on June 12, 2012, 07:55:49 pm ---Hmm... Well maybe your program is finishing before the window even appears. I've seen that happen before. You might want to add a delay or pause in your code. Try looking at the process manager or run "top" in a terminal to see if the thing even starts. I would also try running a debugger on your code and see if something odd pops up.

--- End quote ---

Hahaha!!!  No such luck.  The program is my 3D engine which runs forever --- until you click the close button or click the red x-mark in the codeblocks IDE to stop execution.

With my little "hello world" program I just did "run to cursor" because that one would have been a problem to see.

I also tried stepping into the first few lines of my 3D engine, just in case (by some miracle) some code had been put in my program by a hidden gremlin to hide the console window.  But this just confirmed that no console window appears at all.

!!!!!  HELP  !!!!!   I can't run timings or perform printf()-style debugging.  :-(  And unfortunately, I ***must*** perform printf()-style debugging because codeblocks won't display or allow input-into the 16 256-bit wide SIMD/AVX registers!!!  Hint, hint.  I was tempted to fix that myself, but was told not to months ago.  :-o

ouch:
Well are you sure codeblocks is even set to show the console for that build target yet? Go to your project settings and look at the build targets tab and make sure type is set to Console Application.

Other than that I don't know what the issue is.

bootstrap:

--- Quote from: ouch on June 13, 2012, 11:41:55 pm ---Well are you sure codeblocks is even set to show the console for that build target yet? Go to your project settings and look at the build targets tab and make sure type is set to Console Application.

Other than that I don't know what the issue is.

--- End quote ---
I checked, and it was set to "console application", just as it always has been.

Just for fun, I changed the setting to "GUI application", then did:
 - build => clean
 - build => build
 - run
 - the application runs normally with no console window
 - stop execution (red x mark)

Then I change the setting back to "console application", performed the same steps as above.  Unfortunately, no console was displayed.

Question:  Since I am continuing development of this project that I was developing on 64-bit ubuntu 10.04 on my new fresh installation of 64-bit ubuntu 12.04 (on a new disk drive), after I install the new OS, and before I run codeblocks for the first time, I copy my whole "/home/bootstrap/project" directory from my old drive to my new drive, and I also copy my whole "/home/bootstrap/.codeblocks" directory from my old drive to my new drive.  I guess the question is whether there is some difference between the old .cbp files and/or the old .codeblocks contents that will screw up codeblocks svn8024 when it starts for the first time with these files already in place?

LATER:  On a lark, sort-of investigating my question just stated above, I loaded the ig.cbp project file into an editor and found the following slightly suspicious line:
 
  <Option use_console_runner="0" />

I deleted the line, saved the file, and clicked the green "run" arrow again in codeblocks.

Presto-chango... the console window appeared.

So I guess the question for the gurus is... how did this happen?  Presumably it had something to do with me adopting my old "ig.cbp" file.  But I checked, and my old "ig.cbp" file on my old disk drive also has this line, and that program/codeblocks/OS combination definitely displays the console window.  I guess the other question is why did me switching to "GUI application" and back to "console application" not "clear out the problem" in the ig.cbp file.  For that matter, what is the problem?  What is that line supposed to do?

Jenna:
I can confirm this.
As workaround make sure that the type is "Console application" and also "Pause when execution ends" is checked.
Nevertheless "Console application" should be enough, so I think this is a bug/regression.
I will look into it.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version