XCode 6.1缺少文件中所需的体系结构X86_64 [英] XCode 6.1 Missing required architecture X86_64 in file

查看:96
本文介绍了XCode 6.1缺少文件中所需的体系结构X86_64的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在XCode 6.1中,我收到iPhone 6,iPhone 5s(iOS 7.1)的错误,上面写着

In XCode 6.1 , I am getting error for iPhone 6, iPhone 5s(iOS 7.1) which says

    Undefined symbols for architecture x86_64:
      "_OBJC_CLASS_$_ClientAuthenticator", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
linker command failed with exit code 1

这就是我对架构设置的看法

This is what I have for architecture settings perspective

  Architectures : Standard Architectures(armv7, arm64) - $(ARCHES_STANDARD)
  Base SDK : Latest iOS(8.1) 
  Valid Architectures: arm64, armv7, armv7s

  IOS Deployment Target: iOS 6.0

最近我我的操作系统更新到Yosemite和XCode从6.0到6.1。我在Stackoverflow上搜索了这个涉及XCode 5.1的问题并尝试了所有给定的解决方案,但没有任何效果。

Recently I updated my OS to Yosemite and XCode from 6.0 to 6.1. I have searched on Stackoverflow for this question which refer to XCode 5.1 and tried all the given solutions, but nothing has worked.

更新 - 我按照答案中的建议尝试了更改,但我仍然收到错误消息缺少必需的架构X86_64 。在进一步调查中,我发现来自我的库的文件ClientAuthenticator.o没有为X86_64架构构建,可能这是问题所在?我正在寻找如何为x86_64构建它。

Update - I tried the changes as suggested in the answer, but I still keep getting the error which says "Missing required architecture X86_64" . On further investigation I found that the file ClientAuthenticator.o which is from my library is not getting built for X86_64 architecture and probably that is the issue? I am looking how it can be built for x86_64.

我的新问题是 arm64和x86_64之间有什么区别?更多它似乎只是架构制造商之间的区别,但基本的64位架构保持不变。

My new question is what is the difference between arm64 and x86_64? More of it seems like the difference between just the architecture manufacturer, but basic 64-bit architecture remains same.

推荐答案


  • 首先要确保静态库具有所有体系结构。当您在终端上执行 lipo -info myStaticLibrary.a 时,您应该看到 armv7 armv7s i386 x86_64 arm64 为您的架构胖二进制。

    • The first thing you should make sure is that your static library has all architectures. When you do a lipo -info myStaticLibrary.a on terminal - you should see armv7 armv7s i386 x86_64 arm64 architectures for your fat binary.

      为了实现这一点,我假设您正在制作通用二进制文件 - 将以下内容添加到静态库项目的体系结构设置中 -

      To accomplish that, I am assuming that you're making a universal binary - add the following to your architecture settings of static library project -


      • 因此,您可以看到我必须手动设置标准体系结构(包括静态库项目的64位)(armv7,armv7s,arm64)

      • So, you can see that I have to manually set the Standard architectures (including 64-bit) (armv7, armv7s, arm64) of the static library project.


      • 或者,因为正常的 $ ARCHS_STANDARD 现在包括64位。你也可以 $(ARCHS_STANDARD) armv7s 。如果没有它,请检查 lipo -info ,您将找出缺少的体系结构。这是所有架构的屏幕截图 -

      • Alternatively, since the normal $ARCHS_STANDARD now includes 64-bit. You can also do $(ARCHS_STANDARD) and armv7s. Check lipo -info without it, and you'll figure out the missing architectures. Here's the screenshot for all architectures -


      • 用于参考实现(使用静态库的项目)。默认设置应该可以正常工作 -

      • For your reference implementation (project using static library). The default settings should work fine -

      更新12/03/14
      Xcode 6标准体系结构不包括armv7s。

      那么,不需要 armv7s ?是。似乎armv7和armv7s指令集之间的一般差异很小。因此,如果您选择不包含armv7s,目标armv7机器代码仍可在32位A6设备上运行良好,几乎没有人会注意到性能差距。 来源

      So, armv7s is not needed? Yes. It seems that the general differences between armv7 and armv7s instruction sets are minor. So if you choose not to include armv7s, the targeted armv7 machine code still runs fine on 32 bit A6 devices, and hardly one will notice performance gap. Source

      如果有更智能的Xcode 6.1+方式(iOS 8.1及以上版本) - 请分享。

      If there is a smarter way for Xcode 6.1+ (iOS 8.1 and above) - please share.

      这篇关于XCode 6.1缺少文件中所需的体系结构X86_64的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆