Snow Leopard terminal command problem

Joined
Nov 6, 2009
Messages
3
Reaction score
0
Points
1
I'm working my way through a book on C programming fro the Mac, and right now, I'm trying to compile a simple program. The command in the book is

cc -o slasher main.c

but the terminal says

-bash: cc: command not found

I also tried gcc, with the same result. What's the correct command to compile a program from the CLI? The book hasn't yet been updated for OS 10.6
 
Joined
Dec 13, 2007
Messages
256
Reaction score
10
Points
18
Location
United States of America
Your Mac's Specs
2.1GHz MacBook with 4GB RAM, Mac OS X 10.6, iLife and iWork ‘09
You need to install the developer tools. You can do so either from your OS X Install Disc or from Apple's Web site.
 
OP
W
Joined
Nov 6, 2009
Messages
3
Reaction score
0
Points
1
I thought I already had them. I was right, and wrong; I had Xcode, but not the UNIX developer's tools. I installed the extras and the commands worked.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top