Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSC 215 : Procedural Programming with C

Similar presentations


Presentation on theme: "CSC 215 : Procedural Programming with C"— Presentation transcript:

1 CSC 215 : Procedural Programming with C
C Compilers

2 C Compilers In the Lab, Your saved C program will be displayed with a Microsoft Visual Studio or Java icon. GCC: The classic open source C compiler for Linux and many other operating systems (and Windows under Cygwin or Ming). Xcode. This is for Apple Mac and it is their version of GCC. There are many other C compilers.

3 GCC Compiler If you're on Linux, you can use gcc
If you're on Mac OS X, you can use XCode. XCode is free - it comes on your install CDs. Install it. To get the latest version of Xcode, you can download it from Apple’s website. If you are on Windows, you can use Cygwin. Cygwin is a large collection of GNU compiler collection (GCC) and Open Source tools which provide functionality similar to a Linux distribution on Windows.

4 GCC Command $ gcc hello.c –o hello $ ./hello gcc invokes C compiler
gcc translates C program into executable file $ gcc hello.c –o hello Default output file name a.exe, to run output file, $ ./hello

5 Download and Install Cygwin Compiler
Step 1: Download Setup Download the setup program "setup.exe" from Step 2: Run Setup to Select, Download & Install Cygwin Packages Run "setup.exe" ⇒ Install from Internet ⇒ select a directory (avoid installing in "Program Files" because of that "blank" character) ⇒ choose "Local Package Directory" which saves the downloaded installation files ⇒ select your Internet proxy setting ⇒ choose a download mirror site. (If "choose download site" box is empty, add "ftp://mirror.averse.net/pub/cygwin" in the "User URL". You can find all the mirror sites from Select the packages to install. Important: open the "Devel" (Development) category and select "gcc", "make", Step 3: Setup PATH Include the Cygwin Binary directory (bin) in the PATH environment variable. Suppose that your Cygwin is installed in directory "c:\cygwin". From "Control Panel" ⇒ System ⇒ (Vista only) Advanced System Settings ⇒ Advanced ⇒ Environment Variables ⇒ System Variables ⇒ Select variable named "PATH" ⇒ Edit ⇒ Add "c:\cygwin\bin;" in front of the existing PATH entry. Note that the semi-colon serves as the directory separator to separate Cygwin from the rest of directory paths.

6 Installation Steps Link :
g/howto/Cygwin_HowTo.html


Download ppt "CSC 215 : Procedural Programming with C"

Similar presentations


Ads by Google