image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
LinkBack Thread Tools
  #1  
Old January 28th, 2002, 01:42 AM
Registered User
 
Join Date: Jan 2002
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
bluefossil is on a distinguished road
newbie: compiling c code

do i have to install freeBSD in order to compile c code in OS X?

-lost soul
Reply With Quote
  #2  
Old January 28th, 2002, 08:38 AM
gumse's Avatar
Member
 
Join Date: Mar 2001
Location: Sweden
Posts: 403
Thanks: 0
Thanked 0 Times in 0 Posts
gumse is on a distinguished road
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.
__________________
G4 500 MP 1024 MB RAM
LaCie Electron 22" Display
OS X 10.3.9
iMacDV
MacMini
iSight
iPod + iPod Mini
Sony PC100E FireWire Cam
Static IP via a FreeBSD server/gateway
a lot of other Mac's running Macos 7.5 to 9.1 and NetBSD.
A Few Wintel's on the side (I only use them when I get paid by the hour)
Reply With Quote
  #3  
Old January 29th, 2002, 11:15 AM
Registered User
 
Join Date: Jan 2002
Posts: 115
Thanks: 0
Thanked 0 Times in 0 Posts
bluehz is on a distinguished road
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.
Reply With Quote
  #4  
Old January 29th, 2002, 11:58 AM
gumse's Avatar
Member
 
Join Date: Mar 2001
Location: Sweden
Posts: 403
Thanks: 0
Thanked 0 Times in 0 Posts
gumse is on a distinguished road
Compiling a small program is simple:
cc source.c -o appname

But i guess you have problems with complicated make files, for starters check out:
http://macosx.forked.net/comp.html
__________________
G4 500 MP 1024 MB RAM
LaCie Electron 22" Display
OS X 10.3.9
iMacDV
MacMini
iSight
iPod + iPod Mini
Sony PC100E FireWire Cam
Static IP via a FreeBSD server/gateway
a lot of other Mac's running Macos 7.5 to 9.1 and NetBSD.
A Few Wintel's on the side (I only use them when I get paid by the hour)
Reply With Quote
  #5  
Old January 29th, 2002, 12:08 PM
Registered User
 
Join Date: Jan 2002
Posts: 115
Thanks: 0
Thanked 0 Times in 0 Posts
bluehz is on a distinguished road
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.
Reply With Quote
  #6  
Old February 3rd, 2002, 05:34 AM
Spackle King Of Helsinki
 
Join Date: Feb 2002
Location: Tempe, AZ
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
smeger is on a distinguished road
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
Reply With Quote
  #7  
Old February 3rd, 2002, 04:09 PM
Registered User
 
Join Date: Feb 2001
Location: Bloomington, Indiana
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
jcpowers21 is on a distinguished road
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
__________________
http://www.MrPetry.com
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling C++ code SpacemanSpiff2 Software Programming & Web Scripting 21 November 2nd, 2009 10:03 PM
compiling mesa libs on 10.2 resglowing Unix & X11 0 December 3rd, 2002 02:11 PM
Compiling Java Source Code RockyMorris Software Programming & Web Scripting 2 May 23rd, 2002 02:17 PM
Code Red III fiznutz Mac OS X System & Mac Software 17 December 31st, 2001 03:06 PM
code for posting graphics to thread post or guestbooks? edX Design & Media 5 December 17th, 2001 02:59 AM


All times are GMT -5. The time now is 04:22 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.