简体   繁体   English

使用armv7和armv7s编译框架

[英]Compiling framework with armv7 and armv7s

I am trying to build a static library on xcode 5 and i am aggregating the libraries for iphone simulator and iphone device for creating a framework. 我正在尝试在xcode 5上构建静态库,并且正在聚集iPhone模拟器和iPhone设备的库以创建框架。 But, at the last i am getting error "No architectures to compile for (ARCHS=armv7, VALID_ARCHS=i386 x86_64)" while running the run script for framework. 但是,最后,在运行框架的运行脚本时,出现错误“没有可编译的架构(ARCHS = armv7,VALID_ARCHS = i386 x86_64)”。

I am trying to compile it for armv7 and armv7s both. 我正在尝试将其编译为armv7和armv7s。

Please help me with this issue. 请帮我解决这个问题。

Solved the problem finally. 终于解决了问题。 In my case, i had some dependent project for my static library project. 就我而言,我的静态库项目有一些依赖项目。 In the dependent project settings, the ARCH was armv7. 在从属项目设置中,ARCH为armv7。 I made that to 'Standard architectures (armv7, armv7s)' and it compiled successfully. 我将其设置为“标准体系结构(armv7,armv7s)”,并且编译成功。 For my static library project, the setting are as follows: 对于我的静态库项目,设置如下:

Architectures: Standard architectures (armv7, armv7s) 架构:标准架构(armv7,armv7s)

Base SDK: Latest iOS (iOS 7.0) 基本SDK:最新的iOS(iOS 7.0)

Build Active Architectures Only: NO 仅构建活动架构:否

Supported Platforms: iphonesimulator iphoneos 支持的平台:iphonesimulator iphoneos

Valid Architectures: arm64 armv7 armv7s i386 有效架构:arm64 armv7 armv7s i386

See What's the difference between "Architectures" and "Valid Architectures" in Xcode Build Settings? 请参阅Xcode Build Settings中的“ Architectures”和“ Valid Architectures”有什么区别? :

In short, XCode use intersection between ARCHS and VALID_ARCHS, which in your case is empty as the 2 have no common architecture (hence the error you get) Adding armv7 to VALID_ARCHS might solve the problem. 简而言之,XCode在ARCHS和VALID_ARCHS之间使用交集,在您的情况下这是空的,因为2没有通用的体系结构(因此会出现错误)将armv7添加到VALID_ARCHS可能会解决此问题。

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

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