New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

Snow Leopard terminal command problem


Post Reply New Thread Subscribe

 
Thread Tools
Whitewings

 
Member Since: Nov 06, 2009
Posts: 3
Whitewings is on a distinguished road

Whitewings is offline
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
QUOTE Thanks
nabl

 
nabl's Avatar
 
Member Since: Dec 13, 2007
Location: United States of America
Posts: 256
nabl has a spectacular aura about
Mac Specs: 2.1GHz MacBook with 4GB RAM, Mac OS X 10.6, iLife and iWork 09

nabl is offline
You need to install the developer tools. You can do so either from your OS X Install Disc or from Apple's Web site.
QUOTE Thanks
Whitewings

 
Member Since: Nov 06, 2009
Posts: 3
Whitewings is on a distinguished road

Whitewings is offline
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.
QUOTE Thanks

Post Reply New Thread Subscribe


« Window manager ? | Frozen on desktop, no dock, no access to anything, just spinning wheel »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Snow leopard disaster - apple is replacing my macbook pro.. EntropyX Switcher Hangout 15 10-05-2010 05:04 AM
Can i reinstall Leopard from Snow Leopard deanobeano OS X - Operating System 10 06-08-2010 10:57 AM
Snow Leopard and Time Machine billwill OS X - Apps and Games 8 11-10-2009 09:46 AM
How Do I Uninstall Snow Leopard? c12susan OS X - Operating System 3 09-23-2009 11:44 PM
Snow Leopard hangs on grey screen when usb hard drive attached gilc OS X - Operating System 2 09-19-2009 07:44 PM

All times are GMT -4. The time now is 12:18 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?