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:
or
.
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.
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).
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.
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.