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 gcc and g++ compiler in Ubuntu Linux
OS 1. To follow the installation procedure, you need to be connected to the internet. 2. To install g++ compiler manually, open the terminal by pressing Alt + CTRL + T keys to- gether. 3. Type sudo apt-get install g++ 4. It will prompt for a password. 5. Type your password. 6. Disk space will be displayed and you will be asked to confirm and go ahead. 7. Confirm by typing ‘‘Y’’. 8. The installation will take a few minutes. 9. g++ will get installed. 10. To check the installation, type: g++ -v 11. The version of gcc / g++ will be displayed. 12. This shows that the installation is successfully done. 2 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 either Run or Save the file. 7. If you clicked on the Run button, the Installation Wizard will open. 8. If you clicked on the Save button, go to the location where you saved the file and double-click on the .exe file. This will open the Installation Wizard. 9. Click on Install button. 10. Then click on Continue button. 11. Again click on Continue button. 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 button. 16. Once again, click on Apply button. 17. Finally, click on Close button. This will install gcc and g++ compiler on your system. 18. Close the window. 19. Next, we need to set the path for the System Variables. 20. Right-click on My Computer or type ‘‘This PC’’ in the search bar in Windows 10. 21. In Windows 10, you will have to additionally right-click on ‘‘This PC’’. 22. Click on Properties. 23. Then click on the Advanced tab or Advanced System Settings link. 24. Click on Environment Variables. 25. Then under System Variables select the Path. 26. Double-click on the Path. 27. This will open a dialog box Edit System Variable. 28. In Variable value, type the location where the bin file is present. 29. Add a semicolon (;) before adding the path. For example: ;C:/MinGW/bin 30. This will avoid overwriting the paths you have set previously. 31. Now, open the command prompt and type gcc -v and press Enter. 32. This will display the version no. of the gcc installed. 33. This shows that the installation is successfully done.