newbie: compiling c code

No, but you probably have to install the OS X Developer Tools. Try "cc --help" at the command line to see if you have it installed.
 
I wish there was some down to earth info on compiling items in OS X - but there isn't. I have the developers cd installed and I get around pretty good in UNIX, but I know nothing about programming. I d/l these supposed "OS X" compatible sources and try to compile them following published instructions and get errors to no end. Beats me what the cryptic errors mean. I have basically hit a brick wall. Sure - I know - I'm playing with fire and if you can't stand the heat....but I like living on the edge and I learn really fast. If someone would just create a simple to understand guide to compiling for OS X.
 
Thanks gumse! Thats a great resource AND a lot of those errors that show up are exactly what I see a lot. Now why isn't this info more readily available - say SHIPPING WITH THE DEVELOPER TOOLS CD or something.
 
Most things are pretty easy to compile. Start by cd-ing into the directory with the source code and look to see if there is a file named 'configure.' If there isn't, ignore the rest of these instructions. If there is, type
Code:
./configure
If it works, move on to the next step. If not, try doing
Code:
cp /usr/libexec/config.guess ./
and running ./configure again. If it still doesn't work, you're SOL.

If it does, type
Code:
make
and wait a long time for everything to compile. Then, if you want the software you've just compiled installed, type
Code:
sudo make install
and your software will be installed into /usr/local
 
You can mess around with the configure settings too and then you might not be SOL'd. Their are always work-arounds (well almost always) to getting something to compile/configure/install. Is their something specific that you are having trouble installing?

Justin
 
Back
Top