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!

mokagio
  • 16,391
  • 3
  • 51
  • 58
bogdansrc
  • 1,338
  • 2
  • 15
  • 28

2 Answers2

8

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

Paul R
  • 208,748
  • 37
  • 389
  • 560
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.

the979kid
  • 635
  • 5
  • 15