xcode 如何停止为 64 位构建 xcode5.1

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22316310/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:44:18  来源:igfitidea点击:

how to stop xcode5.1 building for 64bit

xcode64-bitxcode532bit-64bit

提问by Joe Booth

I just updated to xcode 5.1 - apple decided to make all apps compile to 64bit by default - My app has some legacy code and I spent the last couple of hours figuring out how to STOP Xcode building for 64bit. Thought this might help people with the same problem...

我刚刚更新到 xcode 5.1 - 苹果决定让所有应用程序默认编译为 64 位 - 我的应用程序有一些遗留代码,我花了最后几个小时弄清楚如何停止 64 位的 Xcode 构建。认为这可能会帮助有同样问题的人......

See the accepted answer for a clearer visual walk thought

请参阅已接受的答案以获得更清晰的视觉步行思想

(my original text based answer...)

(我基于原文的答案...)

In Targets-->Build Settings-->Architectures-->Architectures

在 Targets-->Build Settings-->Architectures-->Architectures

  1. select other
  2. delete (press '-') $(ARCH_STANDARD)
  3. add (press '+') armv7
  4. add (press '+') armv7s
  5. clean and build
  1. 选择其他
  2. 删除(按“-”)$(ARCH_STANDARD)
  3. 添加(按“+”)armv7
  4. 添加(按“+”)armv7s
  5. 清洁和构建

回答by Anil Varghese

OP is posted the solution along with the question itself. But I feel it would be better to add it as an answer. In Xcode 5.1apple made significant changes to the architecturesection. They made arm64as part of Standard architectures. That means the projects using the default setting will be automatically build for arm64also. So what you will do if your app does not support arm64?.

OP 与问题本身一起发布了解决方案。但我觉得将其添加为答案会更好。在Xcode 5.1苹果部分做了重大改动architecture。它们是arm64作为标准架构的一部分制作的。这意味着使用默认设置的项目也将自动构建arm64。那么如果您的应用程序不支持,您会怎么做arm64.

Doc says:

Doc 说:

Projects not able to support 64-bit need to specifically set the architectures build setting to not include 64-bit.

无法支持 64 位的项目需要专门将架构构建设置设置为不包括 64 位。

How to do that?

怎么做?

  1. Goto Targets-->Build Settings-->Architectures-->Architectures

  2. Double click on the architecture will popup a menu. Choose others

    enter image description here

  3. Delete the existing row - $(ARCH_STANDARD). Add the required architectures one by one

    enter image description here

  4. Now your architecture section will look like this

    enter image description here

  1. 转到目标--> 构建设置--> 架构--> 架构

  2. 双击架构会弹出一个菜单。选择其他

    在此处输入图片说明

  3. 删除现有行 - $(ARCH_STANDARD)。一一添加需要的架构

    在此处输入图片说明

  4. 现在您的架构部分将如下所示

    在此处输入图片说明

回答by Cameron

Or just use $(ARCHS_STANDARD_32_BIT)

或者只是使用 $(ARCHS_STANDARD_32_BIT)