How can I use gcc on mac (without Xcode) for C programming? Which file shall I download? How do I install and run it?
Asked
Active
Viewed 1.3k times
4
-
1Xcode and GCC are not really related. – crush Feb 26 '13 at 16:07
-
When you install the developer tools, you get Xcode, clang and an outdated version of gcc. Since clang is largely compatible with gcc, you should probably use it. – zneak Feb 26 '13 at 16:08
-
2The easiest way is just to install Xcode - this doesn't force you to use the Xcode GUI if you don't want to - you can still do all the old skool stuff with emacs, vi, makefiles, gcc, gdb, etc. – Paul R Feb 26 '13 at 16:08
-
1Frankly what's wrong with this question to have 3 downvotes in 2 minutes? – CharlesB Feb 26 '13 at 16:09
1 Answers
12
Go to Apple dev download site and get the Command Line Tools. It has gcc without XCode.

CharlesB
- 86,532
- 28
- 194
- 218
-
-
-
thank´s CharlesB. I did it, but I also don´t know how I can run it from terminal? ;). Is" > gcc test.c -o ./test " corret to start test.c with gcc ? sorry I´m a beginner ;) – lukas morphey Feb 26 '13 at 18:44
-
yes it is correct. read the various tutorials to learn how to use gcc, and come back here if you have questions – CharlesB Feb 26 '13 at 19:01