I am using macbook air, which editor and compiler should i use ?

+1 nadeem ahmed · June 18, 2015
suggest me both freeware and paid 

Post a Reply


Oldest  Newest  Rating
0 K D · June 18, 2015
for editor it doesnt really matter but most people will say either "Xcode" or "Sublime Text".  For Compilers i would suggest using GCC it comes with Xcode or you can download from GNU's Home page.  I think there is one that actually comes with mac if you are willing to use the terminal that is...  I think its called cc...  I don't know of any paid for compilers sorry

When setting GCC up from Xcode there will a check box  when installing that will mention something about Command line tools you need to check it if you want GCC set up for you by Xcode.
To use GCC on in the terminal:
1. travel to the directory your program is in
2. gcc <name of file>.c -o <desired name for executable>

-o <desired name for executable> is optional but if you don't use it all your executables will be called a.out

Example if program is on your Desktop:
$ cd Desktop
$ gcc HelloWorld.c -o HelloWorld

If you are using Xcode there is a button at the top i think.

really hope this helps...
0 c student · June 19, 2015
For compiling options, I'd recommend you use additional flags, otherwise you will end up with errors that might break your program.

gcc -Wall -Werror -O* -o foo foo.c

* O is Optimization flag where O can be O1/2/3 for levels of optimization.  It optimizes your program and might also bring up errors.
  • 1



One of the most popular languages of all time.

Bucky Roberts Administrator