PDA

View Full Version : Question about universal binaries




floyde
May 31, 2006, 10:30 AM
I'm about to write my first ever Mac software :) . So I was wondering, will a universal binary work under Panther? I need to support the following platforms: PPC-Panther, PPC-Tiger, Intel-Tiger. I noticed that Xcode 2.3 allows the following build options: Mac OS X 10.3.9, Mac OS X 10.4 (Universal).

Does this mean that I'll have to compile a version of my software for Panther and one for Tiger (PPC & Intel)? Also, what ever happened to Mac OS X 10.4 PPC-only? thanks



robbieduncan
May 31, 2006, 10:51 AM
Universal binaries should work under 10.3.9 (not sure about earlier versions of 10.3). Note that you have to take care not to use APIs that were not available in 10.3.9.

PosterPaint (an app I am writing) is developed against the 10.4U SDK and runs fine under 10.3.9.

floyde
May 31, 2006, 11:41 AM
Thanks! I'll be careful with that.

HiRez
May 31, 2006, 02:07 PM
Thanks! I'll be careful with that.This also means making sure your NIBs are compatible (you can check using the Compatibility Checking... item in the File menu of IB). Also note that if you lay out a GUI using a 10.4.x machine, using your app on a previous version may look different than you expect, so make sure you test it on those platforms. I know I've had some issues in the past where the look/spacing of some of the GUI widgets changes slightly when used on different versions.

szymczyk
May 31, 2006, 02:08 PM
So I was wondering, will a universal binary work under Panther?
You can get a universal binary to run under Panther if you set up Xcode properly. You must create a build setting called MACOSX_DEPLOYMENT_TARGET_ppc. This setting is the earliest version of Mac OS X that can run your program on PowerPC Macs. Give this setting the value 10.3 to support Panther.

If you're writing a C++ program, you also have to compile the PowerPC version with gcc 3.3 to get it to work on anything earlier than 10.3.9. You have to create another build setting, GCC_VERSION_ppc. Give it the value 3.3.

floyde
May 31, 2006, 03:16 PM
This also means making sure your NIBs are compatible (you can check using the Compatibility Checking... item in the File menu of IB).
If you're writing a C++ program, you also have to compile the PowerPC version with gcc 3.3 to get it to work on anything earlier than 10.3.9. You have to create another build setting, GCC_VERSION_ppc. Give it the value 3.3.
Thanks, I'm doing a Webkit plugin using Objective-C, so I wont be using any interface stuff for now. Hopefully I'll get a chance to develop something with widgets in the future (it's much more fun than coding in .NET for boring Windows ;) )