In order to build applications that run on Mac OS versions prior to 10.3.9, you need to use gcc 3.3 (see this Apple documentation for details). This is a problem if you have an Intel Mac running Leopard, because the Xcode 2.5 installer will only allow you to install gcc 3.3 on Tiger. However, there is a way to get it to install anyway… Be warned that Apple probably had a good reason to prevent gcc 3.3 from being installed on Leopard, so this may break your system and/or the binaries that you compile. However, it did work for me and allowed me to compile a small application that ran OK on OS X 10.3.7/PPC. Here’s how to do it:
- Install Xcode 2.5, including the 10.3.9 SDK.
- Copy gcc3.3.pkg from the Packages/Packages directory in the Xcode Tools disk image to your desktop.
- Open the copy of gcc3.3.pkg (right click it and choose “Show Package Contents”).
- Open gcc3.3.pkg/Resources/VolumeCheck in a text editor.
- Change
if( CheckVersion("$SYSTEM_VERS", "10.5", "ProductVersion", ">=" ))toif( CheckVersion("$SYSTEM_VERS", "10.6", "ProductVersion", ">=" ))and save the file. - Double-click on your modified copy of gcc3.3.pkg. You will now be able to install it like any standard Installer package.
- “If it breaks you get to keep both pieces.”
Advertisement
I like number 7
Comment by Tim — March 30, 2009 @ 7:05 pm