News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

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

Started by stanislav, September 13, 2010, 10:22:36 PM

Previous topic - Next topic

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:

gnome-terminal -e $TITLE

or

gnome-terminal -x
.

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:
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


Can some one help me please?

Thanks.
exp ( i * pi ) == -1

Jenna

Works here with gnome-terminal -t $TITLE -x

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?
exp ( i * pi ) == -1

Jenna

What happens if you use gnome-terminal -t Test1 -x /usr/bin/cb_console_runner LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. /home/stanislav/Desktop/Test1/bin/Release/Test1 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?
exp ( i * pi ) == -1

Jenna

Can you please copy and paste the whole Build log after trying to start your program with the run-button ?

stanislav

When pushing the run button (green arrow), nothing is shown in the build log.

When pushing the compile and run button (arrow and the gear), for less than a second this message appears:


-------------- Build: Release in Test1 ---------------

Target is up to date.



But it disappears immediately.

Here is the main.c file:

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Hello world!\n");
    //cin.get();
    getchar();
    return 0;
}


Seams to be a unknown problem here.
exp ( i * pi ) == -1

Jenna


stanislav

exp ( i * pi ) == -1