User forums > General (but related to Code::Blocks)

The console does not open after starting the compiled program (ubuntu 10.4)

(1/2) > >>

stanislav:
Hello, I'm new to Code::Blocks and have one problem, which stops me to begin to work on some small projects.

I use Ubuntu 10.4 (64 bit) and have the Code::Blocks SVN 6585 installed (from repositories).

I have made a simple C-Console Projekt with the help of cb. I've chosen the GCC Compiler.

The program was successfully compiled and I can start the manually from the folder where it is compiled in.

But trying to start the program with a console by pushing the button in cb do not work.

The xterm console does not open.

Because I'm using GNOME, I am interested in using the gnome terminal.

I have changed the command for opening a console to:

--- Code: ---gnome-terminal -e $TITLE

--- End code ---
or

--- Code: ---gnome-terminal -x

--- End code ---
.

With the last version the debugger works and the gnome-terminal opens. But ONLY with debugger, not by just starting the program.

Here is the message form the debugger:

--- Code: ---Erstelle um zu gewährleisten das dieDateien auf Letzstand sind
Erstellen erfolgreich
Ziel wählen:
Release
Adding source dir: /home/stanislav/Desktop/Test1/
Adding source dir: /home/stanislav/Desktop/Test1/
Adding file: bin/Release/Test1
Starte Debugger:
erledigt
Neuen Typ registriert: wxString
Neuen Typ registriert: STL String
Neuen Typ registriert: STL Vector
Setze Haltpunkt
Reading symbols from /home/stanislav/Desktop/Test1/bin/Release/Test1...(no debugging symbols found)...done.
Debugger Nameund Version: GNU gdb (GDB) 7.1-ubuntu
Program exited normally.
Debugger wurde mit Status 0 beendet
--- End code ---

Can some one help me please?

Thanks.

Jenna:
Works here with
--- Code: ---gnome-terminal -t $TITLE -x
--- End code ---

You must use -x, because for -e it needs quotes around the command (if spaces are included), and the -x has to be the last in the line.
-e executes the next parameter (that's why you need the quotes, what is not supported by C::B), -x executes the remaining command-line (so no quotes are needed).

stanislav:
Thanks for the quick post but it did not worked for me. Still nothing happens after press the "run" button.

Maybe it's a bug?

Jenna:
What happens if you use
--- Code: ---gnome-terminal -t Test1 -x /usr/bin/cb_console_runner LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. /home/stanislav/Desktop/Test1/bin/Release/Test1
--- End code ---
from a console ?
This should be the command executed if you just click the green triangle for run ( I hope I guessed it correctly) otherwise, copy it frm the build log and try it on the console.

Please post the output here, if you get anything more or less meaningful.

I also tested with C::B 6585 (from my repo) and there are no problems.

stanislav:
It's work normally. The program is started well.

So the command is correct, but it does not work in cb.

Hm... that's really annoying. Maybe I should look up some other preferences? But I don't know, what I can do...

PS: maybe it's compiz?

Navigation

[0] Message Index

[#] Next page

Go to full version