Saturday, January 26, 2013

C++ Compiler for Linux mint/ Ubuntu (g++ compiler) Part 1

Students who are bound to do some programming and people who love programming but uses Linux Mint or Ubuntu does not get the Turbo C/C++, Borland C++, Code Block etc software.

So should you stop learning C++ ?


Hell no.

Dont worry I'll give you two ways of installing C++ compiler in Ubuntu and Linux mint (Online and Offline). For C++ programs you can use G++ compiler an advanced compiler with lot of features.


Online:

To install G++ type following command at command line.


sudo apt-get install g++



But this does not include the library files. So you better use the offline installer files.

Offline:
First of you better download all three files
1: http://adf.ly/404973/g-47
2: http://adf.ly/404973/g-4-3
3: http://adf.ly/404973/libstdc


Though all of them are debian files don't get excited and double click all of them. install them through terminal to get perfect result.

1> Go to Terminal

2> Go to the destination folder(where the files are currently present now). 
[ like if you have kept them in a folder called g++ at desktop then type "cd Desktop" and to reach g++ type "cd g++". So now you are in g++ folder.]

3> Type and enter if ask for administrator password provide it:

sudo dpkg -i g++-4.7_4.7.2-2ubuntu1_i386.deb

sudo dpkg -i g++_4_3a4.7.2-1ubuntu2_i386.deb

sudo dpkg -i libstdc++6-4.7-dev_4.7.2-2ubuntu1_i386.deb

Now you are ready to use C++ in your Linux Mint or Ubuntu.

In next part I will give a small demo about how to use this C++ compiler as there are no code box to write into like windows to before execution. See you in next part.

NB: during installation it may show that there are errors, don't worry they are perfectly installed. Chill.

3 comments:

  1. Do you have the amd64 debs as well?

    ReplyDelete
    Replies
    1. Currently I personally use 32bit PC. But I'll look for amd64 and if i find them, will upload real soon...

      Thanks for your acknowledgement...

      Delete
  2. Currently I personally use 32bit PC. But I'll look for amd64 and if i find them, will upload real soon...

    Thanks for your acknowledgement...

    ReplyDelete