installing gcc compiler
hi everyone,
I am new to linux os and I am using Ubuntu.I want to compile c and c++ programs.My friend told me to use the gcc command but it says "bash:gcc:command not found". If I have to install gcc how should I do it? Thank you! |
You should be able to install it using the Ubuntu package manager. Something along the lines of
Code:
sudo apt-get install gcc |
I would recommend the "build-essential" package, it has gcc, make, c++ and other packages you need to compile source code.
|
if u have an internet connection....
open terminal--> use:: sudo apt-get install build-essentials it'll automatically download & install all necessary packages.. |
I tried the command sudo apt-gtm build-essential and it worked.Now a able to compile both c and c++ files.Thank you all for the help!
|
Quote:
anyways go write some code now..!! |
Quote:
|
thanx for the info. dude..
wat other packages are there on the CD?? Cause i am really pissed off using the internet everytime i need a new package..!! |
the package I know are available are:
Code:
binutils If you have a line like Code:
deb cdrom:[Ubuntu 6.06 _Dapper Drake_ - Release i386 (20060531)]/ dapper main restricted |
so where do all the packages that i download thru 'apt' go...??
in which directory/?? |
They are saved in /var/cache/apt/archives
|
where do i get the current kernel's source??
|
To get the current kernel source (2.6.15) install linux-source-2.6.15, you get that from the web (42MB). I did say it was on the CD, but it's not, guess it's to big to waste that much space on a CD.
|
the whole kernel is there as a package..
linux-source-2.6.15 ?? |
yep, the whole source from kernel.org with ubuntu patches. The package is about 43MB and puts linux-source-2.6.15.tar.bz2 in /usr/src/
You can also get the source with "apt-get source linux-image-`uname -r`" |
All times are GMT -5. The time now is 11:19 AM. |