LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   C programming in ubuntu 10.04 (http://www.linuxquestions.org/questions/linux-newbie-8/c-programming-in-ubuntu-10-04-a-830590/)

sainiankit 09-06-2010 09:35 AM

C programming in ubuntu 10.04
 
I recently purchased a new laptop DELL Inspiron 14R (N4010) with some modifications. It has windows 7 installed on it (64 bit)
and now ubuntu too.
I read somwhere on the internet that C programming in ubuntu can be done in Gedit.
And compiler to be used is gcc.
Well i HAve Gedit on ubuntu,But what about gcc ?? is it already installed??
or i have to?? If i have to then how can i get it? i dont have an internet connection on my ubuntu(having some problem to connect) but i can connect to the internet via windows 7 installed on the same system.

alunduil 09-06-2010 09:39 AM

You might be able to install gcc from the CD repository. Insert the CD and then edit your software sources in the system->administration menu. One of the tabs should allow you to select the CD-ROM as a source and then you should be able to apt-get install gcc.

Regards,

Alunduil

vinaytp 09-06-2010 09:41 AM

Hi,

Welcome to LQ,

Configure network in Ubuntu.
http://www.ubuntugeek.com/ubuntu-net...mand-line.html

You will not have gcc installed by default in Ubuntu.

Use apt-get or synaptic to install gcc once you are able to connect to network.

knudfl 09-06-2010 05:16 PM

*

And 'sudo apt-get install g++' will install the c++ compiler and some
packages (libc6-dev, linux-libc-dev) that makes gcc usable.

..

animeman 09-06-2010 06:43 PM

just install it by using sudo apt-get install g++ it will give you the c plus plus complier which im assuming that it will give you both though im not compleatly sure to use you c compiler you have to save it with a .c extension then i will name it first.c
cc -c first.c will make a object file then you wan to do this
cc -o first first.c which will make a excutible called first then you run it by doing a ./first i hope i could help some =]


All times are GMT -5. The time now is 05:08 PM.