I need an easy to use c compiler. Suggestions

April 5, 2011 at 12:33:50
Specs: Macintosh
I am trying to learn c but the compilers I find like XCode are obviously for professionals. Can you recommend a site from which I can download? This is for an Mac OSX. Thank you.

See More: I need an easy to use c compiler. Suggestions

Report •

April 5, 2011 at 12:44:55
XCode is the easiest compiler to use on OS X. You can use it to write anything from the simplest "Hello World" console program to the most complex GUI programs.

You can use gcc from a terminal, but it's easier to use XCode.

Report •

April 5, 2011 at 13:48:14
Sorry, XCODE will not run the simple codes I write. I copy the codes from the book accurately but XCODE tells me that they fail. It's frustrating and only gives gibberish in the error reports.

Report •

April 6, 2011 at 00:01:23
As I don't know what you are trying to do, it's difficult to comment further, but I can assure you that XCode will compile the simplest programs.

Still, open a terminal and use some text editor and gcc.

Report •

Related Solutions

April 6, 2011 at 01:01:43
I wasn't at my Mac when I wrote the last post. Here's a simple introduction to using XCode for a simple C program.

1. Open XCode.
2. File/New Project.
3. Under "Mac OS X" select "Command line utility".
4. In the right-hand pane select "Standard Tool".
5. Click choose.
6. Give it a name.
7. You now have a simple Project. Expand "Source" and click on "main.c" to see the program.
8. Build/Build to compile the program.
9. Run/Console to open a console so that you can see the output.
10. Run/Run to run the program and see the result in the console window.

You can then change the code in main.c as you wish and repeat the build/run procedures. Add more files to the Project, if you wish, with File/New and then selecting the appropriate file type.

It really is very easy. But to make the most of XCode you'll probably need to buy a book about it, or read a few online tutorials. TBH, the Mac is not the best platform (IMO) to learn programming on, but if it's all you've got it's still OK.

Report •

May 26, 2011 at 07:12:58
Hi, try Codeblocks or, if you don't mind paying, C-Free is very nice. Both are very simple and are not 'Project' oriented.


Report •

May 26, 2011 at 12:35:46
The OP specifically asked about compilers for OS X. I don't believe that either of the ones that you mention run on OS X, do they?

Report •

Ask Question