Tiger/Leopard, PPC/Intel?

Discussion in 'Mac Programming' started by Forquare1, Jun 27, 2008.

  1. Forquare1 macrumors newbie

    Jun 22, 2008
    Hi guys,

    I've made my first application :D I coded it on my MacBook running Leopard. Then tried it on my girlfriends iBook running Tiger. It didn't work on my girlfriends Mac. If that because it's PPC, or because it's on Tiger?

    Also, my program just contains windows, text boxes and buttons. Surely this is standard stuff that Tiger has too? So I could go ahead and release it for both Tiger and Leopard. And presumably make it Universal Binary too?

    Thanks all,

  2. kpua macrumors 6502

    Jul 25, 2006
    You should make sure to target the 10.4 SDK if you want it to run on Tiger, and yes, you need to make it a Universal Binary for it to be able to run on both PPC and Intel.
  3. Forquare1 thread starter macrumors newbie

    Jun 22, 2008

    I presume I can do that by setting the "Active SDK) to 10.4, so it runs on Tiger and Leopard.

    Then to make it Universal Binary, do I just set "Active Architecture" to PPC, so it compiles for that, but Intel machines can still read it?

    Thanks very much for your last reply.

  4. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    Well, no. Universal bineries are two applications in one package. So you would need to compile it for PPC and Intel. The Apple documentation should explain it pretty well.
  5. Sayer macrumors 6502a


    Jan 4, 2002
    Austin, TX
    Actually if you make a PowerPC version it will run okay on an intel Mac. For best performance you should make a Universal Binary.
  6. locoputo macrumors newbie

    Dec 25, 2008
    little help please. Im compiling on my intel macbook for my old ibook running 10.4

    what do I need to add to ./configure ?

    thanks for any advice
  7. gnasher729 macrumors P6


    Nov 25, 2005
    A few principles: First, when you build your application, you have to decide what is the lowest operating system that it will run on. Look for "Deployment Target" in your build settings. If you want the program to run on 10.4, you need to switch it to 10.4 instead of "Compiler Default" or "10.5".

    Second, you have to decide which features you want to be able to use. You choose that under "Base SDK". If you match the "Deployment Target", like 10.4 SDK and 10.4 Deployment Target, then you can't use any 10.5 features, but on the other hand your code will run fine on 10.5. If you don't match them, like 10.5 SDK and 10.4 Deployment Target, then you have to be careful: You can use 10.5 features, but your code will crash if you use them on a 10.4 system.

    Under "Architectures", you want to select ppc + i386; that will run on all Macs. By default, debugging versions are compiled only for your own machine, so don't give debugging versions out, but only release versions.

    After reading your second post: It is the "Deployment Target" which decides where your code runs.

    Deployment Target 10.4: The OS allows you to run on 10.4 Systems or newer.
    Deployment Target 10.5: The OS allows you to run on 10.5 Systems or newer.

    10.4 SDK: You can use 10.4 features only. If you try to use 10.5 features, it won't compile. If it compiles, it runs on 10.4 and 10.5.
    10.5 SDK: You can use 10.5 features. 10.5 features work on 10.5; if you try to use them on 10.4, the program will crash.

    Let's say there is a function void TenFiveFunction (void) which was introduced in 10.5.

    10.4 SDK: The call will not compile.
    10.5 SDK + running on 10.4: The call will compile and crash if it is executed.
    10.5 SDK + running on 10.5: The call will compile and work.

    Correct way to use it:

    if (&TenFiveFunction == NULL) {
    // The function is not available.
    } else {
    TenFiveFunction ();

Share This Page