Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing GCC to Mac OS X Leopard without installing Xcode

Tags:

I'd like to install gcc to Mac OS X Leopard, and compile some software from source using MacPorts. As http://www.macports.org/install.php has suggested, I've registered as an Apple developer. Now I have to download the Xcode developer tools, but it seems to be enormous. Is such a big download (3.5GB or 1GB) really necessary just for gcc and some header files (mostly for console applications)? Is there a smaller download (possibly on some other site) which would work? Did I find the proper download (Xcode Developer Tools), as required by the MacPorts website?

I don't need an IDE, I don't need any iOS-related software, I don't need big SDKs, I don't want to do any GUI programming.

I don't have an install disk.

There was a similar question Is there a way to install gcc in OSX without installing Xcode? . My question is different, because I wouldn't mind downloading and istalling parts of Xcode to get gcc, as long as it's reasonably large, say 300 MB uncompressed. Is that possible?

At http://developer.apple.com/devcenter/mac/index.action I've found the download link http://developer.apple.com/ios/download.action?path=/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg , which is a 3.5GB download. Based on some answers below, I noticed that Xcode 3.2.5 is for Snow Leopard, and I need Xcode 3.1.4 (1GB) for Leopard, which I can get from http://connect.apple.com/ (titled Downloads and ADC Program Assets) after registration and logging in, clicking on the section Downloads / Developer Tools, then finding Xcode 3.1.4 Developer Tools. The download link is http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/download?path=%2FDeveloper_Tools%2Fxcode_3.1.4_developer_tools%2Fxcode314_2809_developerdvd.dmg .

like image 260
pts Avatar asked Dec 05 '10 17:12

pts


People also ask

Do I need Xcode for gcc on Mac?

Xcode and GCC are not really related. When you install the developer tools, you get Xcode, clang and an outdated version of gcc. Since clang is largely compatible with gcc, you should probably use it.

Does Xcode include gcc?

Xcode includes command line development tools such as gcc and friends.

Is gcc preinstalled on macOS?

Often times, you need c or gcc compiler to compile open source projects in Mac OS X. The problem is Mac OS X doesn't install the gcc compiler by default.


1 Answers

Maybe this one is right for you: https://github.com/kennethreitz/osx-gcc-installer

I'm using homebrew and everything is fine: http://blog.strug.de/2011/09/homebrew-without-xcode-save-15-gb/

like image 145
leif Avatar answered Oct 28 '22 23:10

leif