Xcode compile for Intel 32-64bit only
Asked Answered
D

2

5

I'm trying to compile only for 32bit and 64bit. No matter what I choose in Xcode, I can either compile for 64bit or for 32bit, 64bit and ppc. I don't want ppc at all. Anyone has any idea how to compile for 32 & 64bit only?

Thanks!

Demitasse answered 12/11, 2010 at 23:31 Comment(0)
J
8

In the Architectures setting for the project just set it explicitly to i386 and x86_64 rather than using the preset options.

Jay answered 12/11, 2010 at 23:41 Comment(1)
I think you mean x86_64. Also, be sure the "Compile native architecture only" option is not checked.Drucie
L
3

To compile only for i386 and x86_64 (i.e. Intel) and not PPC, do the following:

  1. Go to Project|Edit Project Settings
  2. Select Build tab
  3. In Architectures, do not select any of the standard given options such as Standard (32/64-bit Universal) as these will always throw in ppc. Select Other... and add i386 and x86_64 manually.
  4. In Valid Architectures, make it the same as Architectures (i.e. i386 and x86_64).

Compile. Test with lipo command in shell. (lipo -info test.app/Contents/MacOS/test) It should only say x86_64 i386 for architectures in file.

If that's not the case, then:

Go to Project|Edit Active Target "your app name" and do the same changes you did above, adding i386 and x86_64 manually.

Compile and test with lipo. It should say it's x86_64 i386 only.

Lorie answered 16/11, 2010 at 13:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.