Xcode
From OS X Scientific Computing
Contents |
Quick Start
- Go to Apple's website, register, and download the latest Xcode (v. 3.0 for OS X 10.5.x and v. 2.5 for OS X 10.4.x as of this writing) and install it. Install everything, not just the defaults. Be sure to install X11 SDK (it should do so by default).
Note that Xcode 3.0 comes on the OS X 10.5 installation DVD, so you shouldn't have to download anything.
- The installation is free, but you have to register, which is kind of tedious.
- Xcode also comes with OS X, but you still need to check to be sure you have the latest version. (On computers with OS X pre-installed, an Xcode installer may be found in /Applications/Installers. Otherwise, it should be on the OS X install DVD.)
- The download is over 1GB, so plan on using a fast connection. (This is a bit frustrating since you only need about 100 MB of the stuff that comes with it.)
Details
Why do this?
For our purposes, this is to get ahold of the compilers. (Apple supplies gcc, g++, objective-c and related gnu compilers, along with various header files, libraries, and ancillary programs that make compiling third-party software possible.)
Apple's Xcode (Developer Tools) are designed to enable anyone to create OS X applications. For our purposes (compiling software, primarily), the critical components are the compilers and associated library and header files, as well as compiler-associated software like the linker, make, and so forth. These things get installed in /usr. The stuff that enables you to build OS X applications gets installed into /Developer. If you are short on space (eg, you have a laptop), you can install everything and then delete the /Developer directory (burn it to a DVD first if you are worried).
What about Fortran?
If you need a fortran compiler, gfortran, g95, fort77, f2c, and g77 (ppc only) are available as fink packages.
Other Compiler Options
Intel makes cc/c++ and fortran compilers that you can buy and install. This may be worth doing if you have a lot of numerically or computationally intense computing tasks, and need the most efficient binaries possible.
You can download free evaluation copies that will permit you to try before you buy:
IBM also makes proprietary compilers, but since the switchover to intel, I am not sure that these will be continued.
Odds and Ends
You need to use the following complier flag syntax for linking Cocoa Frameworks and Apple's Blas/Lapack now:
-Wl,-framework -Wl,vecLib
External Links
Apple's Xcode website and download links
My old Developer Tools page

