Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Complie Code

Complie Code
Thread Tools
Fresh-Faced Recruit
Join Date: Feb 2001
Status: Offline
Reply With Quote
Sep 24, 2001, 08:25 PM
 
I am fairly new in Mac OS X. I have read all the documentation I could ever read but it doesn't tell me how to compile code in the command line. I don't have the developer tools and I can't do any other compiles because I don't have GCC. How do I compile GCC in the command line? Please help. As soon as 10.1 is released I'm going to work on certification.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Sep 25, 2001, 08:02 AM
 
Originally posted by macosxgeek:
<STRONG>I am fairly new in Mac OS X. I have read all the documentation I could ever read but it doesn't tell me how to compile code in the command line. I don't have the developer tools and I can't do any other compiles because I don't have GCC. How do I compile GCC in the command line? Please help. As soon as 10.1 is released I'm going to work on certification.</STRONG>
You appear to be slightly confused.
gcc IS the compiler. You don't compile it (well, you can, but you wouldn't want to, it requires setting up the extremely evil Darwin build environment etc etc).
You will need the developer tools. You can get them from http://connect.apple.com (free registration required).
     
Dedicated MacNNer
Join Date: Apr 2001
Location: Bethesda, MD
Status: Offline
Reply With Quote
Sep 26, 2001, 09:40 AM
 
Note that although the compiler is "gcc", on OS X it's installed as "cc".

So to compile a simple program, you'd type something like:

cc -o program program.c

program.c is the input C file
program is the output executable

dave
     
   
Thread Tools
Forum Links
Forum 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 On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:20 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2