O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Universally Fat Binaries

Mach-O supports fat files, officially called universal files by Apple. These let you have PowerPC, Intel, and the 32-bit and 64-bit flavors of each kind of code in the same file. This allows for a single application or a single framework to service all the computing worlds.

Fat binaries from the command line

You can use gcc on the command-line, or in makefiles, to generate object code for any of the supported architectures. You can also build the final fat binaries using these command-line tools.

gcc’s -arch flag controls which architecture(s) it should build. For Mac OS X, you can give -arch the ppc, i386, ppc64, and x86_64 flags. iOS is an ARM architecture, so you would use armv6 or armv7 if you were constructing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required