Xcode 6.1:文件是为x86_64构建的,这不是被链接的架构(i386) [英] Xcode 6.1: file was built for x86_64 which is not the architecture being linked (i386)

查看:311
本文介绍了Xcode 6.1:文件是为x86_64构建的,这不是被链接的架构(i386)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为util / extensions创建了一个Swift框架项目,它将一个 .framework 文件编译并复制到系统上的一个专用位置。我想能够包括这个文件到其他项目(构建阶段/链接二进制与库)。框架项目是一个Cocoa Touch Framework类型项目(从Xcode 6.1项目模板浏览器中选择)。

I've created a Swift framework project for util/extensions that compiles and copies a .framework file to a dedicated location on my system. I want to be able to include this file into other projects (Build Phases/Link Binary with Libraries). The framework project is a Cocoa Touch Framework type project (as selected from Xcode 6.1 project template browser).

但是当我尝试编译一个链接框架文件的项目时,发生此警告:

But when I try compiling a project which links the framework file, I'm getting this warning:


ld:警告:忽略文件
/ Users / name / Projects / Xcode / Libs / swiftutils .framework / swiftutils,文件
是为x86_64构建的,这不是被链接的架构
(i386):
/Users/name/Projects/Xcode/Libs/swiftutils.framework/swiftutils

ld: warning: ignoring file /Users/name/Projects/Xcode/Libs/swiftutils.framework/swiftutils, file was built for x86_64 which is not the architecture being linked (i386): /Users/name/Projects/Xcode/Libs/swiftutils.framework/swiftutils

有什么我可以做的框架项目,以便它是有效的其他iOS项目?这是令人困惑的,因为框架项目是一个Cocoa Touch框架项目,应该自然地与其他Cocoa Touch(ie IOS)项目一起工作,不应该吗?

Is there anything I can do with the framework project so that it is valid for other iOS projects? It's confusing because the framework project is a Cocoa Touch Framework project which should naturally work with other Cocoa Touch (i.e. IOS) projects, shouldn't it?

推荐答案

确保您的lib的架构设置中列出了 i386 x86_64 。还只能将仅构建活动架构显式设置为

Make sure you have i386 and x86_64 listed in your Architectures in Build settings for your lib. Also set Build Active Architecture Only explicitly to No.

这篇关于Xcode 6.1:文件是为x86_64构建的,这不是被链接的架构(i386)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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