installing C libraries on a macintosh

i'm learning C through "the art and science of C" by eric roberts, and to begin must install libraries on my mac.

downloaded libraries here:

being a newbie there are several instructions that i don't understand:


  1. Use FTP to retrieve the file standard.shar to the home directory on your machine.

  2. Execute the standard.shar script by typing

sh standard.shar (where do i type this command? terminal doesn't know what to do with it.)

This step creates a top-level directory called cslib that contains all of the relevant files.

  1. Connect to the cslib directory.

  2. Rebuild the object files and libraries by typing


  1. Copy the file gccx from the cslib directory into a directory on your command search path. If you will be the only person using the libraries, you could put this file in your private command directory, which is usually ~/bin. If you are installing this command for use by any user on the system, you will need to put it in a public directory, such as /usr/local/bin. For public installation to work, your cslib directory must be readable by other users.

thanks mucho.

(where do i type this command? terminal doesn't know what to do with it.)

You type in into a Unix command-line shell, i.e. "Terminal". Now, when reporting difficulties with Unix stuff, it's essential to tell us the exact error message that you got. Just saying "it didn't work" gives us no clues as to why it didn't work. The error message will tell us everything.

Do you have the file called "standard.shar" in your home directory on the Mac? If you type "ls" in the Terminal, what does it say?

thanks much for the thought, yes just getting my feet wet.

gotten all the way to discovering that my mac doesn't come with the standard C package, doesn't understand "make".

terminal gives me: seanos-macbook-pro:cslib seano$ make -bash: make: command not found

so now i'm downloading the apple developers gcc compiler to get there. looks like i'll install Xcode and see where that leads.

Sounds like you're making progess! You'll definately need tools like 'make' and the C compiler on your machine.