Compiling on Mac OS X

There are a lot of pre-compiled binaries available for Mac OS X, but sooner or later you will need to compile something from source. You'll download some gzipped file, unpack it, cd into the directory, and a README will tell you to do "./configure;make && make install"

But it didn't work, did it? That's because Mac OS X doesn't install make or cc or indeed any development tools at all by default.


Hate these ads?


Fortunately, this is easy to fix. Pop in your install DVD and you'll see a folder called "Xcode Tools". Click on that, install it, and you will now have make, cc and everything else you need to compile that little C code you downloaded.

However, Xcode gives you much more than that. The few little things you needed aren't even the half of it. Xcode is actually a complete IDE (Integrated Develpment Environment) for Mac OS X. It's really great stuff, and right after you get that compile done, I'me sure you will want to take a look at this. So you open up Applications and..

Huh? Nothing new here. What gives?

No, really, you did install all this stuff. It's just not in Applications. You'll find it under /Developer at the root of your hard drive. There's a gig and a half of stuff there. You can find example projects and prebuilt utilities - it's really a treasure trove of code. There's a simple example of using some of this at Xcode for the Rest of Us. You'll find a good overview at http://www.macdevcenter.com/pub/a/mac/2003/10/24/panther.html and a Google search for "Xcode Tutorials" will turn up much more.


Technorati tags:

Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them.

I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.




Comments




Fri Mar 10 06:06:47 2006: Subject:   FloralMike
Thanks Tony! With your help, I loaded the tools on my MAC MINI and have already used them to compile some source provided from cleancode.org. I didn't know the other tools where there until I read this article - I cannot wait to poke around and tinker with them. What follows is an un-solicited plug for A.P. Lawrence and company. We have used Tony for SCO/Linux/MAC OS X support for the past 5 or 6 years and it is the best deal ever! Seriously, If you are not using his phone/e-mail support, you are truly missing out. Thanks Tony!





Thu May 31 20:37:38 2007: Subject: precompiled make?   anonymous
like you said developer tools gives over a gig more than asked for, and some people need space more than Xcode - precompiled binaries of make seem hard to come by!! would you be prepared to post the compiled binary yourself?





Wed Dec 5 23:09:14 2007: Subject:   TonyLawrence
I'm sorry, I never noticed the above comment.

gravatar

I have no idea what you mean by "precompiled binaries of make seem hard to come by"
so I really can't answer your question. If you are asking if I would provide a repository for compiled apps, no, I have no interest in doing that but there certainly are places that do. "Darwin ports" has many, many ports.. See http://aplawrence.com/Words/2005_02_20.html

Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments

If you want a picture to show with your comment, go get a Gravatar



Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here


book graphic unix and linux troubleshooting guide

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!





pavatar.jpg
More:
       - MacOSX
       - Programming












Change Congress