View Full Version : Multiple boot or Virtual machine in Mac OS

Oct 22, 2009, 12:49 AM

I have an application for Mac OS 10.5.1 and now I want to support Mac OS 10.4. I am assuming that there is some API difference between the two versions and hence I will have to get 10.4 and test the app on it.

I am having a single Mac system. Is it possible to have two versions of OS on the same system, or is it possible to make a VM (like in windows) to test the application on it. Please suggest.


Oct 22, 2009, 12:56 AM
If you're the developer of the application, I believe you can download the 10.4 SDK and use it alongside the 10.5 SDK in Xcode.

Oct 22, 2009, 12:31 PM
You want your code to run on MacOS X 10.4, so first step is setting the deployment target to 10.4. Next you have to make a decision: Do you want to use 10.5 features when running on 10.5 or not? To find all the 10.5 features you are using, set the SDK to 10.4. 10.5 functionality won't compile anymore. If you don't want to use 10.5 features, then just remove any use of them. This is the easiest method, obviously you won't have access to 10.5 features that way.

If you want to use 10.5 features if present, I typically write code following this pattern:

#if <SDK version is 10.5 or later>
if (10.5 function is available)
use 10.5 function
use 10.4 function

Make sure it compiles and works correctly when using the 10.4 SDK, with reduced functionality because 10.5 functions cannot be used. Then make sure it compiles and works correctly when using the 10.5 SDK, and that is the version you are shipping. Deployment target must always be 10.4, otherwise it won't even start on 10.4. Following this scheme gives you a very good chance to have working code.

BTW. gcc 4.2 cannot be used with 10.4 SDK.
BTW. You can't install 10.4 on any Mac that shipped with 10.5. Probably best to buy a used iMac or MacMini that comes with 10.4. Possibly a PowerPC if you want to make sure it works on a PowerPC.

Oct 23, 2009, 03:25 AM
Thanks to both of you, for the valuable inputs.