Difference between 32-bit and 64-bit builds in Xcode?

Discussion in 'Mac Programming' started by Littleodie914, Jun 23, 2011.

  1. macrumors 68000

    Littleodie914

    Joined:
    Jun 9, 2004
    Location:
    Rochester, NY
    #1
    Hey guys, I've been upgrading my dev. environment to Xcode 4, and I noticed a confusing change in the Scheme menu. (See screenshot.)

    What is the difference between the 32-bit scheme and the 64-bit scheme? My project settings seem to indicate that the build is both 32- and 64-bit.

    A bit of research didn't turn up too much on the subject. :eek:
     

    Attached Files:

  2. macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #2
    You're right that you're build a 32-bit/64-bit Universal app.

    Primarily you're choosing weather you're running your Universal app as a 64-bit app or a 32-bit app. But you can customise any aspect of the phases differently between 32-bit and 64-bit development.
     
  3. mif
    macrumors regular

    Joined:
    Feb 16, 2010
    Location:
    home
    #3
    64-bit application can only be used with newer 64-bit prosessors, i guess.
     
  4. thread starter macrumors 68000

    Littleodie914

    Joined:
    Jun 9, 2004
    Location:
    Rochester, NY
    #4
    So the actual application will be compiled, regardless of which Scheme I choose, as a Universal app.

    Picking one of the 'bit-specific' Schemes only defines in which mode it will be running on my machine in Xcode?
     
  5. jiminaus, Jun 23, 2011
    Last edited: Jun 23, 2011

    macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #5
    No, I'm wrong about being able to customise the scheme settings between 32-bit and 64-bit. You can't. Unless you create different schemes. The 64-bit verses 32-bit are destinations of the same scheme, with the same settings. It's just about "where" the program is run.

    Another example of destination is in iOS development. In iOS projects, you'll have an iPad simulator destination, an iPhone simulator destination, and an iOS device destination.


    Yes, this is determined by the target build settings, not the scheme. A scheme can choose which targets to build and what they're built for (eg run, test or profile) and the build configuration (debug vs. release), but not the build settings like which architectures are built.
     
  6. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #6
    I don't know if this is true, perhaps you can build in both schemes and check, but there is key that can appear in Info.plist that lists the preference order of the binary types that appear in the fat binary. It is possible that compiling in 32-bit scheme makes the 32-bit binary the first item in the order and the 64-bit binary second.
     
  7. macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #7
    I don't know about that info.plist list key. I'd only used the arch command to determine which environment to run in. But that's no good for testing when a app is opened from the Finder.
     
  8. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #8
    I only know about it as I was poking around in the iTunes 10.5 beta. It also has a key that lets you set architecture/OS compatibility: it only runs 64-bit on Lion.
     

Share This Page