3

I am a beginner, trying to code C on a Mac. I am using Learn C the Hard way By Zed but when I tried running the C code on my Mac it would not run. I have installed Xcode from the mac Appstore but when I try to run my code using the command "make" or "gcc" the terminal responds command not found. Am I doing something wrong?

I have tried searching for the solution but all of the ones I have found say just to install Xcode and do not give further instructions.

I am just hoping to find out how to test/run my code. Thanks for the help in advance!

4

1 回答 1

3

Install the Command line tools via xcode. You just go into preferences and then downloads.

XCode 4.3 Command Line Tools

If you still have troubles after updating xcode or installing command line tools try this install after:

https://github.com/kennethreitz/osx-gcc-installer

Good Luck!

于 2012-07-06T21:59:47.557 回答