mac_dir - Running C programs on a Mac - You have a couple...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Running C programs on a Mac --------------------------- You have a couple options: 1) Use gcc if it's already on your machine. 2) Use XCode if gcc isn't already on your machine. You can do #2 even if gcc is already on your machine. To check if gcc is on your machine, open a terminal window. The directions on how to do this are included below. Then, at the prompt, type gcc, by itself. If it says something to the effect of "gcc - unknown command", then you don't have gcc. If it instead says something like, "no input files", then you do have gcc. If you have gcc and don't want to deal with XCode, here's what you can do: Using gcc on Mac OS X --------------------- 1. Type and Save your program in TextEdit. a. Type your program in TextEdit. b. Save your program as a .c file. To do this, go to the format menu, and then choose "make plain text." If that option is not there, then your file is being stored as plain text. (The other option is "make rich text format.") Once you've chosen make plain text, then choose save as and enter program.c. Make sure
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

mac_dir - Running C programs on a Mac - You have a couple...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online