Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: kcho on September 02, 2011, 08:29:33 pm
-
Hi! I've got problem trying to run a C program. The compilation process is OK. The program runs from the console manually and I can debug it too.
The problem arises when I run the program inside the C::B, the console shows:
sh: Syntax error: "(" unexpected
and exits with error 2.
I was searching on Google and in the forum and nobody reports a problem related with a running program, just compilation problems.
Please help me :)
Code::Blocks 10.05
Ubuntu 11.04
Kernel 2.6.38.11
-
Please change "Settings -> Compiler and debugger... -> Global compiler settings -> [your compiler] -> Other settings (rightmost tab) -> Compiler logging:" to "Full commandline" and post the content of the "Build log", if C::B tries to run your program.
-
Hi, thank you for your answer. This is the log:
Compilation
-------------- Clean: Debug in ej15 ---------------
Cleaned "ej15 - Debug"
-------------- Build: Debug in ej15 ---------------
gcc -Wall -g -g -Wall -g -c "/home/XX/Documents/XX/XX/XX/TP-02(1c)/XX/ej15/main.c" -o obj/Debug/main.o
g++ -o ej15 obj/Debug/main.o
Output size is 9.25 KB
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings
Run
Checking for existence: /home/XX/Documents/XX/XX/XX/TP-02(1c)/XX/ej15/ej15
Executing: xterm -T ej15 -e /usr/bin/cb_console_runner LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. /home/XX/Documents/XX/XX/XX/TP-02(1c)/XX/ej15/ej15 (in /home/XX/Documents/XX/XX/XX/TP-02(1c)/XX/ej15/.)
Process terminated with status 0 (0 minutes, 16 seconds)
But copying these logs I found that there is a parenthesis in the executable path. So I changed it by a dash and the program ran OK. :D
I think there is a problem with the use of xterm and the "-e" parameter.