64位模拟器X code Mach-O的连接错误 [英] Xcode Mach-O Linker errors with 64-bit simulator

查看:728
本文介绍了64位模拟器X code Mach-O的连接错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在开发以x code iOS应用程序。它编译并经常在模拟器完美运行,但是当我打开模拟器设备到64位,它失败,13个新的警告和37个新的错误,所有这一切都是相关的(我认为)与我使用的外部库名为 ObjectiveDDP https://github.com/boundsj/ObjectiveDDP )。人有类似的问题,但我的理解是,他们理应固定在最近发布的更新的框架,但在我结束此更新是没有效果的。我使用的是第二个框架 SocketRocket https://开头github.com/square/SocketRocket ),但我不认为这是罪魁祸首给定的X code的输出。

I have been developing an iOS app in Xcode. It compiled and ran perfectly in the regular simulator, but when I switched the simulator device to 64-bit, it failed with 13 new warnings and 37 new errors, all of which are associated (I think) with an external library I'm using called ObjectiveDDP(https://github.com/boundsj/ObjectiveDDP). People had similar problems, but my understanding is they were supposedly fixed in a recently-released update to the framework, but on my end this update is to no avail. A second framework I'm using is SocketRocket (https://github.com/square/SocketRocket), but I don't think this is the culprit given Xcode's output.

此外,很明显,很多人都有过这样的Mach-O错误的框架与64位不兼容到达。不过,我觉得这是一个问题,我的档案机构。话虽这么说,我也相信,首要的问题是这样的: 忽略文件/path/to/project/ObjectiveDDP/libcrypto.a,文件/path/to/project/ObjectiveDDP/libcrypto.a缺少所需的体系结构的x86_64 。有没有办法通过添加架构来解决这个问题,在该文件中?每回答一个类似的问题,我试图改变我的生成设置架构标准体系结构(ARMv7的,armv7s,arm64),并再次检查其他的相关性都得到满足。

Additionally, it is clear that many people have had such Mach-O errors arrive from frameworks not compatible with 64-bit. However, I feel like this is an issue with the organization of my files. That being said, I also believe that the overarching issue is this: Ignoring file /path/to/project/ObjectiveDDP/libcrypto.a, missing required architecture x86_64 in file /path/to/project/ObjectiveDDP/libcrypto.a. Is there a way to fix this issue in that file by adding that architecture? Per an answer to a similar question, I have tried changing my Build Settings architecture to Standard architectures(armv7, armv7s, arm64) and have rechecked that other dependencies are all met.

下面是对错误的部分:

Undefined symbols for architecture x86_64:
  "_BN_CTX_free", referenced from:
      _srp_verifier_new in srp.o
      _srp_user_start_authentication in srp.o
      _meteor_user_generate_kgx in srp.o
      _meteor_user_generate_aux in srp.o
      _meteor_user_generate_S_string in srp.o
  "_BN_CTX_new", referenced from:
      _srp_verifier_new in srp.o
      _srp_user_start_authentication in srp.o
      _meteor_user_generate_kgx in srp.o
      _meteor_user_generate_aux in srp.o
      _meteor_user_generate_S_string in srp.o
      _srp_user_process_meteor_challenge in srp.o
  "_BN_add", referenced from:
      _srp_verifier_new in srp.o
      _meteor_user_generate_aux in srp.o
  "_BN_bin2bn", referenced from:
      _srp_verifier_new in srp.o
      _H_nn in srp.o
      _meteor_user_generate_u in srp.o
      _meteor_user_generate_x in srp.o
      _meteor_user_generate_k in srp.o
      _meteor_user_generate_M_string in srp.o
      _meteor_user_generate_HAMK in srp.o
      ...

和什么样的错误看起来像X code进行截图:

And a screenshot of what the error looks like in Xcode:

我的研究后,我还是想知道如果这只是一个模拟器的问题,它会自行消失,当在一个物理iPhone 5S测试,也只是我如何才能摆脱这些错误的?做任何事情在这里建议的文件组织的问题?另外两个警告:

After my research I still am wondering if this is just a simulator issue and it'll resolve itself when tested on a physical iPhone 5S, and also simply how I can get rid of these errors? Does anything here suggest a file organizational issue? Two other warnings are:

LD:警告:目录中找不到选项   -L /路径/到/地点/项目名称/项目名称/ ObjectiveDDPLD:警告:   找不到选项目录   -L /路径/到/地点/项目名称/ SocketRocket / ObjectiveDDP

ld: warning: directory not found for option '-L/path/to/place/projectname/projectname/ObjectiveDDP' ld: warning: directory not found for option '-L/path/to/place/projectname/SocketRocket/ObjectiveDDP'

和这两条路径不存在,但我认为我纠正它被删除的文件夹,将它们移动到回收站,并重新添加它们。

And these two paths don't exist, but I thought I corrected it by deleted the folders, moving them to the trash, and re-adding them.

任何有识之士将大大AP preciated。

Any insight would be greatly appreciated.

推荐答案

看起来 libcrypto.a 包含未编译为64位拱你ObjectiveDPP包。如果您需要64位,这个答案看起来像它会帮助你获得的文件:

It looks like libcrypto.a included with your ObjectiveDPP package is not compiled for 64-bit arch. If you need 64-bit, this answer looks like it will help you to get that file:

<一个href="http://stackoverflow.com/questions/19812997/where-i-can-find-openssl-ios-7-libcrypto-a-and-libssl-a-static-library-for-arm64">Where我能找到的OpenSSL的iOS 7 libcrypto.a和libssl.a静态库的arm64架构

如果没有,你可以编译自己的应用程序没有64位支持。

If not, you can just compile your own app without 64-bit support.

64位刚加入第X code 5.1的默认值。你可以设置你的架构在自己的项目中,以 $(ARCHS_STANDARD_32_BIT)来删除它,然后回到5.0的行为。

64-bit was just added to the defaults in Xcode 5.1. You can set your architecture in your own project to $(ARCHS_STANDARD_32_BIT) to remove it and go back to the 5.0 behavior.

这篇关于64位模拟器X code Mach-O的连接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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