User forums > Help
Problem with running application in Ubuntu
(1/1)
AlekseyT:
I have problem on Ubuntu system. Then I compile and run console project terminal window start but show nothing. I get string what use Code::Blocks when start application:
--- Code: ---Executing: xterm -T TTTT -e /bin/sh -c /usr/bin/cb_console_runner /home/MyProject/TTTT/bin/Debug/TTTT (in /home/MyProject/TTTT/.)
--- End code ---
Then I run command
--- Code: ---# sh -c /usr/bin/cb_console_runner /home/MyProject/TTTT/bin/Debug/TTTT
--- End code ---
in console I see message
--- Code: ---Usage: cb_console_runner <filename> <args ...>
--- End code ---
As you see shell (/bin/sh) run program cb_console_runner but do not give its arguments. I no find settings what can delete word "sh -c" from command line (i find only non-working Settings->Environment->General Settings->Shell to run command in ...). Please help me :(
Thank you
[CB build 4324]
Vorl:
Hello,
I had the same problem.
I suspect that the best would be to enclose commands and args by doublequotes after the sh -c (eg. to have /bin/sh -c "/usr/bin/cb_console_runner /home/MyProject/TTTT/bin/Debug/TTTT"), but it's something that require modification of CB itself. So for the moment, I have done the following :
I have unchecked "pause when execution ends" in the properties of the project and this cause cb_console_runner not to be used. Then I replaced xterm by "konsole --noclose" to force a pause after execution (gnome console should have something equivalent (?)).
Now it works except that this time it is the arguments of my program that are not used (due to the same problem with sh -c). But as long as you do not have arg for your program, it should work.
rhf:
--- Quote from: Vorl on August 02, 2007, 06:22:34 pm ---I have unchecked "pause when execution ends" in the properties of the project and this cause cb_console_runner not to be used. Then I replaced xterm by "konsole --noclose" to force a pause after execution (gnome console should have something equivalent (?)).
--- End quote ---
Vorl,
Hmm. My question is Windows not Ubuntu related, but you have peaked my curiosity. I frequently create console outputs using "pause when execution ends" and find it very awkward to have to close the console window before CB receives the focus. Also, I often want to keep multiple console windows open so that I can quickly compare the results of code/variable changes, etc. Do you know if there is an equivalent procedure that you describe here for use in Windows.
Thanks,
Vorl:
I'm sorry but I dont know CB from inside. Under windows the two settings lines for the shell and the console commands are grayed so I guess that CB use a hard coded call to launch the console under windows but this has to be confirm by a dev.
I suppose you use "> file" as final arg of your prog to dump the results in different files to compare ? Clearly less confortable but I dont see another solution for your problem.
Navigation
[0] Message Index
Go to full version