Installing gcc with Cygwin:



Step 0: Download and run the cygwin installer.


Step 1: Select “Install from Internet”:


Step 2: Install to default location:


Step 3: Use default local package directory (click next)

Step 4: Use whatever internet connection settings (click next)

Step 5: Select a mirror (click next)

Step 6 (a): In the “Select Packages” expand “Devel”:



Step 6 (b): Select gcc, gdb, and make:



Step 7: click next and follow the rest of the installation instructions.


Clicking on the “cygwin” icon placed upon your desktop gets you to a “bash” shell (see below) with the current working directory of C:\cygwin\home\<username>.  Assuming you have placed a C program in this directory in a file called “main.c” you can use gcc as shown below (you can create “main.c” using “notepad.exe” which ensures it is a pure text file—wordpad.exe may save your code in “rich text” which gcc will not understand).