Results 1 to 10 of 13
i want to lean using debian to develop C language, but i am a newbie, i don't know where to write the C programme and what tool to be used ...
- 03-22-2010 #1Just Joined!
- Join Date
- Mar 2010
- Posts
- 14
[SOLVED] develope C on debian
i want to lean using debian to develop C language, but i am a newbie, i don't know where to write the C programme and what tool to be used to compile it. any tips would be appreciated. the more detail, the better.
- 03-22-2010 #2Just Joined!
- Join Date
- Mar 2010
- Posts
- 7
use gcc:
use man to find out more.Code:gcc helloworld.c -o helloworld
Code:man gcc
- 03-22-2010 #3Just Joined!
- Join Date
- Mar 2010
- Posts
- 14
thank you for you reply, but i don't know how to install gcc. could you tell me how to set it up,
- 03-22-2010 #4
Open a terminal from menu, run following command
If you logged in normal user,it'll prompt you for root password.sudo apt-get install build-essential
After installing gcc,open any text editor , gedit , kwrite etc
write the program and save it and then use
and run it asgcc file.c -o file
./file- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 03-22-2010 #5Just Joined!
- Join Date
- Mar 2010
- Posts
- 14
many thanks, Lakshmipathi. i have installed the gcc, what a good text editor for write c code, i won't want to use an IDE. i am a newbie, sorry to have lots of problems. i also want to know how to install a text editor , and how to open it, when i finished my code,how to save it and excute it.
- 03-22-2010 #6
A lot of text editors available in sources and a few are pre-installed by default.
My first preference is nano. A simple, user friendly text edit.
You can use pico, vi or vim too.
Press Ctrl+X, Y and hit Enter key to save file.Code:nano mycode.c
In case its not pre-installed, install it using apt-get.
Code:su -c 'apt-get install nano'
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 03-22-2010 #7Just Joined!
- Join Date
- Mar 2010
- Posts
- 14
thank you! sometimes, i see there is also a command of aptitude, what is the difference between 'apt-get and aptitude.
- 03-22-2010 #8
There is no difference now. aptitude had a few more features than apt-get earlier. New features have been included in latest version of apt-get and both are same now.
Synaptic Package Manager is Graphical Interface of apt-get only.It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 03-22-2010 #9Just Joined!
- Join Date
- Mar 2010
- Posts
- 14
why i use {ctrl} x can't exit the editor ? thanks in advance.
- 03-22-2010 #10
Ctrl+X is for exit but if you change anything in file or create new file, it will ask for saving. If you press Y and hit Enter key it will exit.
Ctrl+X , exit file unmodified file.
Ctrl+W, write changes. You have to press Ctrl+X to exit.
Ctrl+X, Y and Enter to save and exit.
More details are here.It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First



