为设备和模拟器创建 32 位和 64 位静态库 - Xcode [英] Create 32-bit and 64-bit Static Library for Devices and Simulators - Xcode

查看:27
本文介绍了为设备和模拟器创建 32 位和 64 位静态库 - Xcode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个支持 64 位的 SDK.无论出于何种原因,该库都不是基于 iOS 模拟器构建的.为了避免这种情况,我创建了自己的静态库,用于实例化标头并实现所有内容.这种方法一直有效,允许我在模拟器和设备上构建和运行项目(标准库用于设备,我的静态库用于模拟器).

I've got this SDK that supports 64-bit. For whatever reason, the library does not build on iOS simulators. To circumvent this I've created my own static library that instantiates the headers and implements everything. This method has always worked and allowed me to build and run the project on a simulator and devices (The standard library is used for devices and my static library is used for simulators).

现在我们有 64 位和 32 位设备和模拟器,我的静态库不是为 32 位模拟器构建的.但是,它确实适用于所有设备(32 位和 64 位)和 64 位模拟器.

Now that we have 64-bit and 32-bit devices and simulators, my static library does not build for 32-bit simulators. However, it does build for all devices (32-bit and 64-bit) and 64-bit simulators.

有人知道如何创建适用于 32 位和 64 位设备和模拟器的静态库吗?

Does anyone know how to create a static library that works for both 32-bit and 64-bit devices and simulators?

推荐答案

你需要创建一个胖库,它是不同架构的库的组合.看看这个要点创建胖库

you need to create fat library which is a combination of libraries for different architecture. have alook at this gist Create fat library

这篇关于为设备和模拟器创建 32 位和 64 位静态库 - Xcode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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