Sunday, August 18, 2013

How to install C/C++ compiler on Lubuntu

In case you want to make program on lubuntu using C or C++ then you will need to install the compiler first in order to get everything works.

Just like on ubuntu, to install the C/C++ compiler you need to type :


sudo apt-get install build-essential
You will be asking for root password and you'll need connected to the internet, because it will download the compiler from the repository.
kernelpanic@lubuntu:~$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree    
Reading state information... Done
The following extra packages will be installed:
  binutils dpkg-dev fakeroot g++ g++-4.7 gcc gcc-4.7 libalgorithm-diff-perl
  libalgorithm-diff-xs-perl libalgorithm-merge-perl libc-dev-bin libc6-dev
  libdpkg-perl libfile-fcntllock-perl libgcc-4.7-dev libgomp1 libitm1
  libstdc++6-4.7-dev linux-libc-dev make manpages-dev
Suggested packages:
  binutils-doc debian-keyring g++-multilib g++-4.7-multilib gcc-4.7-doc
  libstdc++6-4.7-dbg gcc-multilib autoconf automake1.9 libtool flex bison gdb
  gcc-doc gcc-4.7-multilib libmudflap0-4.7-dev gcc-4.7-locales libgcc1-dbg
  libgomp1-dbg libitm1-dbg libquadmath0-dbg libmudflap0-dbg binutils-gold
  glibc-doc libstdc++6-4.7-doc make-doc
The following NEW packages will be installed:
  binutils build-essential dpkg-dev fakeroot g++ g++-4.7 gcc gcc-4.7
  libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
  libc-dev-bin libc6-dev libdpkg-perl libfile-fcntllock-perl libgcc-4.7-dev
  libgomp1 libitm1 libstdc++6-4.7-dev linux-libc-dev make manpages-dev
0 upgraded, 22 newly installed, 0 to remove and 119 not upgraded.
Need to get 30,0 MB of archives.
After this operation, 82,8 MB of additional disk space will be used.
Do you want to continue [Y/n]? 
Now you can try compile your C/C++ program, happy coding :)

No comments:

Post a Comment