Hello guys,
I have Manjaro Linux installed on my mahcine which is based on Arch Linux with XFCE environment on top of it . I installed code blocks through Arch respiratories . However , when I write a simple program like hello world in C, it complies successfully but does not launch in terminal to show me" hello world". I just started learning C for my school , I have code blocks on widnows and it run successfully with MS-Dos, however, I want to do it on linux since I want to learn how to use linux as every uses. Bear in mind that I am still above a little bit on noob level on linux :) . I tried to change terminal type from Environment setting but did not work on codeblocks.
Do you have the terminal installed?
does the executable file exists?
Quote from: oBFusCATed on May 06, 2013, 08:40:49 PM
Do you have the terminal installed?
Yes I have terminal installed but I am operating in XFCE environment so I think code blocks is un able to launch terminal for xfce terminal.
Quote from: BlueHazzard on May 06, 2013, 11:30:42 PM
does the executable file exists?
What do you mean by that ?. To have code blocks installed , my distro provides add/remove software . I search for codeblocks and installed it automatically for me like Ubuntu software centre. So no , I do not have the executable files
He probably means are you sure the hello world compiled properly. Did you get any warnings/errors? Im using XFCE too, though via xubuntu. I installed CB via apt-get. As a quick test I just did a new project and chose 'Console Application' and C++. Gave it a name and next'd till i had the default hello world code. Compile and build successfully popped open a console window with no adjustments needed to the project.
Can you verify what -exact- steps you did to make your test program?
Quote from: king601 on May 06, 2013, 06:24:27 PM
I tried to change terminal type from Environment setting but did not work on codeblocks.
What is the current value of the terminal command in the env settings?
Quote from: oBFusCATed on May 07, 2013, 10:15:39 AM
What is the current value of the terminal command in the env settings?
I know that wasnt directed at ME. But since im also using XFCE figure id post what mine looks like as reference
(http://i.imgur.com/W2asLXx.png)
Hello guys again . I am providing you with picture of simple program in C with the compile output, "hello world". It does not matter which type of terminal I running, all of them yields the same thing
(http://i.imgur.com/TLPoduO.png)
http://imgur.com/TLPoduO
king601: Do you have xterm installed on the system?
Looks like the project path and executable name contains spaces. Remove them and it should work (if xterm is installed).
@devs: where do the backslashes come from? ...
xterm -T my\ first\ c\ project ...
should be ...
xterm -T "my first c project" ...
?
- osdt
'\' is the escape character i.e. to insert a space afaik.
Quote from: scarphin on May 08, 2013, 02:26:57 PM
'\' is the escape character i.e. to insert a space afaik.
Indeed, it works to guard spaces ...
mkdir "/tmp/aaa bbb"
echo "#/bin/sh\necho Hello World" > "/tmp/aaa bbb/hello world.sh"
chmod +x "/tmp/aaa bbb/hello world.sh"
xterm -T /tmp/aaa\ bbb -e /usr/bin/cb_console_runner /tmp/aaa\ bbb/hello\ world.sh
Process returned 0 (0x0) execution time : 0.009 s
Press ENTER to continue.
xterm -T "/tmp/aaa bbb" -e /usr/bin/cb_console_runner "/tmp/aaa bbb/hello world.sh"
Process returned 0 (0x0) execution time : 0.009 s
Press ENTER to continue.
Funny, I've never seen it to be used like this :D
- osdt
Quote from: oBFusCATed on May 08, 2013, 08:46:12 AM
king601: Do you have xterm installed on the system?
No I don't have one. I tried all the options in the environment setting but code blocks does not detect terminal. My system is arch Linux with XFCE installed so I can launch terminal from main menu . What is the difference to have xterm?. How do I install it ?
Update: I was able to xterm from arch repositories and now code blocks works ;D thank you guys for your help
Update 2: I am now able to run the program in xfce terminal by doing this code :
xfce4-terminal -T $TITLE -x , many thanks
Quote from: king601 on May 08, 2013, 05:30:21 PM
xfce4-terminal -T $TITLE -x , many thanks
Added in svn...