Author Topic: my c++ program doesn't run... no errors during compile  (Read 7673 times)

Offline ausairman

  • Multiple posting newcomer
  • *
  • Posts: 12
my c++ program doesn't run... no errors during compile
« on: June 20, 2011, 08:38:13 am »
Hi everyone,
I've tried to find a solution to this online, without success. I have some code that I've successfully compiled, which I now want to run. Whenever I click "run" in code::blocks nothing happens (no warning, error, nothing).

I also tried changing the "Terminal to launch console programs in" in Settings->Environment to "gnome-terminal -t $TITLE -x" but this had no effect.

Pressing F8 does the following; a little white console pops up for a second with something along the lines of "Failed to set controlling terminal: Operation not permitted", then in the debugger window the following is written:

Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: /home/uqaschwa/Dropbox/code/nn/C++/Neural Net/
Adding source dir: /home/uqaschwa/Dropbox/code/nn/C++/
Adding file: bin/Debug/Neural Net
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Program exited normally.
Debugger finished with status 0

My build target type is set to "Console Application" and I am using Ubuntu 11.04/CB 10.05. I realise this may not have anything to do with code::blocks but I really have no idea where to look. Please don't lmgtfy me or tell me it's obvious. Thanks in advance.
« Last Edit: June 20, 2011, 09:10:24 am by ausairman »
Ubuntu 11.04 (64-bit), optiplex 990 i7

Offline ausairman

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: my c++ program doesn't run... no errors during compile
« Reply #1 on: June 20, 2011, 09:19:09 am »
Ok after changing the environment setting to "gnome-terminal -t $TITLE -x" the program does launch when I debug, but it still displays "warning: GDB: Failed to set controlling terminal: Operation not permitted" before running the code. Running the code outright still does nothing.

As suggested in other posts, I tried running code blocks from the terminal but running the code still does nothing, and debug still launches in a new terminal window and produces the same error...
Ubuntu 11.04 (64-bit), optiplex 990 i7

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: my c++ program doesn't run... no errors during compile
« Reply #2 on: June 21, 2011, 03:50:21 pm »
Ok after changing the environment setting to "gnome-terminal -t $TITLE -x" the program does launch when I debug, but it still displays "warning: GDB: Failed to set controlling terminal: Operation not permitted" before running the code. Running the code outright still does nothing.
This is not an error, but a warning.
And it's a gdb issue and cannot be fixed by C::B.