csc 215 : procedural programming with c c compilers

5
CSC 215 : Procedural Programming with C C Compilers

Upload: amice-joseph

Post on 12-Jan-2016

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: CSC 215 : Procedural Programming with C C Compilers

CSC 215 : Procedural Programming with C

C Compilers

Page 2: CSC 215 : Procedural Programming with C C Compilers

C Compilers

•Microsoft Visual Studio•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 Macs and it is their version of GCC but purely for Apple's own Mac OS Operating System.

•There are many other C compilers.

Page 3: CSC 215 : Procedural Programming with C C Compilers

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.

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

Page 4: CSC 215 : Procedural Programming with C C Compilers

GCC Command

•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

Page 5: CSC 215 : Procedural Programming with C C Compilers

Download and Install Cygwin CompilerDownload Setup•Download the setup program "setup.exe"

from www.cygwin.com.

• Follow the Steps in (1-How to Install Cygwin): https://www3.ntu.edu.sg/home/ehchua/programming/howto/Cygwin_HowTo.html

• Select the packages to install: gcc for c, make