如何忽略iOS模拟器的一些静态库 [英] How to ignore some static library for iOS simulator

查看:541
本文介绍了如何忽略iOS模拟器的一些静态库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为sdk iphoneos和iphonesimulator构建我的项目。很少有.a静态库只能用于iphoneos。如果在XCode中构建iphonesimulator,我可以在哪里忽略这些文件?

I am trying to build my project for sdk iphoneos and iphonesimulator. There are few .a static libraries that can only be utilized for iphoneos. Where can I go an ignore these files if its being build for iphonesimulator within XCode?

谢谢。

推荐答案

不使用硬链接库,而是使用项目配置设置中的其他链接器标志设置。您将能够根据当前的构建配置链接不同版本的库。

Instead of hard linking the libraries, use the "Other Linker Flags" setting in the project configuration settings. You'll be able to link different versions of libraries based on the current build configuration.

默认情况下,您已经有Debug和Release构建配置,按下加号按钮在Debug上将添加特定体系结构的配置。选择任何iOS模拟器并链接您要用于在模拟器上运行应用程序的库。然后再次按下Debug上的加号按钮,这次选择Any iOS并链接你想用来在设备上运行应用程序的库。

By default you already have Debug and Release build configuration, press the "plus" button on the Debug will add a configuration for a specific architecture. Choose "Any iOS Simulator" and link the libraries you would like to use to run the app on simulator. Then press the "plus" button on the Debug again, this time choose "Any iOS" and link the libraries you would like to use to run the app on the device.

最后,对Release配置执行相同的操作。

Lastly, do the same thing for the Release configuration.

这篇关于如何忽略iOS模拟器的一些静态库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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