We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2
Instruction Sheet for C and C++ Installation
Spoken Tutorial Team
IIT Bombay
1 The procedure to install C and C++ in Linux OS
1. To follow the installation procedure, you need to be connected to the internet. 2. You must have Synaptic Package Manager installed on your machine. 3. If not installed, please install Synaptic Package Manager using Ubuntu Software Center.
2 The procedure to install gcc and g++ compiler
1. On Ubuntu 11.04 and higher, (a) Press the Window key on your keyboard to open Dash Home. (b) Type Synaptic Package Manager. (c) Click on the Synaptic Package Manager option. 2. Enter your Admin Password. 3. Click on OK. 4. In the search box, type gcc. 5. Click on the gcc check box >> click on Mark for Installation. 6. Click on Apply. 7. Now in the search box replace gcc with g++. 8. Click on the g++ check box >> click on Mark for Installation. 9. Now click on Apply. 10. The installation will take a few minutes depending on your internet speed. 11. After the installation completes, open the terminal and type gcc -v 12. This will display gcc version version-number <gcc> 13. However, the version of gcc / g++ may possibly vary. 14. This message shows that the installation is successfully done.
3 The procedure to install gcc and g++ compiler from Terminal
1. To install g++ compiler, open the terminal. 2. To do so, press Alt + CTRL + T keys together. 3. Type sudo apt-get install g++ 4. It will prompt for a password. 5. Type your password. 6. It will display how much has to be downloaded from the internet and how much disk space will be occupied. 7. Type y and press Enter to confirm this. 8. The installation will take a few minutes. 9. g++ will get installed. 10. To check type: g++ -v 11. However, the version of gcc / g++ may possibly vary. 12. This shows that the installation is successfully done. 4 The procedure to install C and C++ in Windows OS 1. To follow the installation procedure, you need to be connected to the internet. 2. For Windows OS, we will install MinGW compiler. 3. Go to http://sourceforge.net/projects/mingw/files/Installer/ 4. Please locate the executable file mingw-get-setup.exe 5. Click on this .exe file. 6. A dialog box appears prompting you to Run the file. 7. Click on Run. 8. This opens the Installation Wizard. 9. Click on Install. 10. Then click on Continue. 11. Again click on Continue. 12. Click on the mingw32-gcc-g++ GNU C++ Compiler check box and click on Mark for Installation. 13. Now check the option for mingw32-gcc-objc The GNU Objective-C Compiler also and click on Mark for Installation. 14. Click on Installation option on the top left hand side corner. 15. Then click on Apply changes. 16. Finally, click on Close. This will install gcc and g++ compiler on your system. 17. Close the window. 18. Next, we need to set the path for the System Variables. 19. Right-click on My Computer. 20. Click on Properties. 21. Then click on the Advanced tab or Advanced System Settings link. 22. Click on Environment Variables. 23. Then under System Variables select the Path. 24. Double-click on the Path. 25. This will open a dialog box Edit System Variable. 26. In Variable value, type the location where the bin file is present. 27. Add a semicolon (;) before adding the path. For example: ;C:/MinGW/bin 28. This will avoid overwriting the paths you have set previously. 29. Now, open the command prompt and type gcc -v 30. This will display the version no. of the gcc installed. 31. In this case, it will display gcc version 4.6.2 <gcc> 32. However, the version of gcc / g++ may possibly vary. 33. This shows that the installation is successfully done.