简体   繁体   English

在iOS设备和iOS模拟器上运行时,我的.a应该是什么体系结构

[英]What architecture should it be my .a for running on iOS Device and iOS Simulator

I have build a fat library with the architectures "arm64", "armv7" and "x86" from various lib.a. 我用来自各种lib.a的“ arm64”,“ armv7”和“ x86”架构构建了一个胖库。 I have no problem when I compile the project for iOS Devices but it seems the compilation goes wrong when I try it into a iOS simulator. 当我为iOS设备编译项目时,我没有问题,但是当我将其尝试到iOS模拟器中时,似乎编译出错。 It says "Undefined Symbols for x86_64". 它说“ x86_64的未定义符号”。 I can Imagine that I need also the x86_64 lib.a But I wonder what can I do for solving the problem. 我可以想象我也需要x86_64 lib.a,但是我想知道如何解决这个问题。

Note: The libraries where manually compiled from OpenHome 注意:库是从OpenHome手动编译的

Than you 比你

Edited: Could be because of the makefile from Here 编辑:可能是因为来自这里的makefile

As a first step, make sure if your fat bin definitely includes x86_64. 第一步,请确保您的胖容器是否确实包含x86_64。 To do so, you can check w/ cmd as follows. 为此,您可以按以下方式检查w / cmd。

$ xcrun lipo -info yourLibrary.a

If your lib definitely contains x86_64, it should show 如果您的库中肯定包含x86_64,则应显示

Architectures in the fat file: yourLibrary.a are: x86_64 arm64 ...

For example, I have compiled libpng for x86_64 and arm64 for my app. 例如,我为我的应用程序编译了x86_64的libpng和arm64。 The xcrun command shows as follow. xcrun命令如下所示。

$ xcrun lipo -info libpng.a
  Architectures in the fat file: libpng.a are: x86_64 arm64 

Needless to say, fat bin has both arm64 and x86 (since it's FAT). 不用说,fat bin同时具有arm64和x86(因为它是FAT)。 So fat bin doesn't require separate x86_64 lib.a as you mentioned in you q. 因此,胖仓不需要您在q中提到的单独的x86_64lib.a。

Checking your Makefile is after you confirmed your fat bin has x86_64. 在确认胖箱具有x86_64之后,检查Makefile。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM