26 Mart 2014 Çarşamba

Installing GCC with Cygwin

Here's a manual for you to be able to compile your c programs via cygwin in windows operating systems.

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”.
All necessary packages are in Devel category, but if you want to find them more easily, you can search the packages by writing the word into the textbox located at the top of the program.

Step 6 (b): Select gcc, gdb, and make. There are more than one package named with gcc. You can either select everything or just select the ones which related with C compiler (gcc-core/gcc-g++)

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).

Share

& Comment

0 yorum:

Yorum Gönder

 

Copyright © 2015 Papiculo !™ is a registered trademark.

Designed by Templateism. Hosted on Blogger Platform.