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 > C for OS X, where?

C for OS X, where?
Thread Tools
Woggle
Junior Member
Join Date: Jun 2001
Location: Asbury Park
Status: Offline
Reply With Quote
Sep 3, 2001, 12:14 PM
 
The subject says it all, a friend is looking for GNU C compiler, where can we get it?
Woggle
'I will not be pushed, filed, indexed, stamped, briefed, debriefed or numbered. My life is my own.'-- No. 6
     
parallax
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Sep 3, 2001, 12:55 PM
 
The Dev Tools (connect.apple.com) come with Apple's modified version of gcc (called cc), and g++ (called c++).
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Apocalypse
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
Sep 3, 2001, 05:11 PM
 
cc should do whatever you need but, if you really want gcc, it can be compiled for OS X. A friend of mine compiled it for me once back in the public beta days during his free time. As I recall, the only thing that had to be done to compile gcc is to download the compiler source and change one of the configuration files to indicate that it will be compiling Power PC code. I don't know where the option was, specifically, but you could find it with a little work.

I just don't know why you would want to use gcc since cc seems to work fine already.

Jeff.
Spectral Class
"Shedding Light on Innovation"
     
whodisbe
Registered User
Join Date: Jun 2001
Location: Texas
Status: Offline
Reply With Quote
Sep 3, 2001, 05:13 PM
 
doesn't power bulder do that? Power Builder is on the OSX Developers CD.
     
Angus_D
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Sep 4, 2001, 01:58 PM
 
Originally posted by whodisbe:
<STRONG>doesn't power bulder do that? Power Builder is on the OSX Developers CD.</STRONG>
Project Builder (not Power Builder) is just an IDE built around gcc. At its heart, it still uses gcc to do all the compiling.
     
Angus_D
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Sep 4, 2001, 02:02 PM
 
Originally posted by Apocalypse:
<STRONG>cc should do whatever you need but, if you really want gcc, it can be compiled for OS X. A friend of mine compiled it for me once back in the public beta days during his free time. As I recall, the only thing that had to be done to compile gcc is to download the compiler source and change one of the configuration files to indicate that it will be compiling Power PC code. I don't know where the option was, specifically, but you could find it with a little work.

I just don't know why you would want to use gcc since cc seems to work fine already.</STRONG>
cc IS gcc.
[localhost:~] finlayd% cc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs
Apple Computer, Inc. version gcc-926, based on gcc version 2.95.2 19991024 (release)

You cannot compile gcc 2.95.x (which Apple's gcc is based off) on Mac OS X. You can compile gcc 3.0.x on OS X as a cross-compiling target, I *think*. There is work underway to port gcc 3.1 to OS X, should you really need it, but it's a moving target. You can get more information on it from Stan Shebs, it's available from anoncvs.opensource.apple.com (module gcc3), and you should search the archives of [email protected] (archives available at http://www.darwinfo.org). You will have almost definitely no need to compile gcc3 though.
     
superlarry
Senior User
Join Date: Jan 2001
Location: california
Status: Offline
Reply With Quote
Sep 6, 2001, 12:06 AM
 
when you run the srcdir/configure, use it with --host=powerpc

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
srcdir/configure --host=powerpc
</font>[/code]

this, however, will only get you so far. ended up not working with gcc 2.95.3. somewhere on gcc.gnu.org it says that powerpc-darwin will work in build 3.1, but they're only at 3.0 right now.
     
Angus_D
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Sep 6, 2001, 02:05 PM
 
Originally posted by superlarry:
<STRONG>this, however, will only get you so far. ended up not working with gcc 2.95.3. somewhere on gcc.gnu.org it says that powerpc-darwin will work in build 3.1, but they're only at 3.0 right now.</STRONG>
Well yes, as I said

3.0 *WILL* build on Darwin as a cross-compiler, though. It just won't build native (and even if it did, you wouldn't be able to use it for things like Obj-C because Apple's runtime is different and incompatible). Stan Shebs is working really hard on 3.1, though
     
   
 
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
Top
Privacy Policy
All times are GMT -4. The time now is 06:32 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,