Xcode 6.1:文件是为 x86_64 构建的,它不是被链接的架构 (i386)

2023-05-19移动开发问题
17

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

问题描述

限时送ChatGPT账号..

我为 util/extensions 创建了一个 Swift 框架项目,它编译并复制一个 .framework 文件到我系统上的专用位置.我希望能够将此文件包含到其他项目中(Build Phases/Link Binary with Libraries).框架项目是 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(即 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 的 Build settings 中的 Architectures 中列出了 i386x86_64.还将 Build Active Architecture Only 明确设置为 No.

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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

Cocos2D + 仅禁用 Retina iPad 图形
Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)...
2024-08-12 移动开发问题
10

Cocos2d 播放2种不同的背景音乐文件或循环播放效果
Cocos2d play 2 different background music files or loop playEffect(Cocos2d 播放2种不同的背景音乐文件或循环播放效果)...
2024-08-12 移动开发问题
30

没有cocos2D的xcode iphone粒子
xcode iphone particles without cocos2D(没有cocos2D的xcode iphone粒子)...
2024-08-12 移动开发问题
4

Cocos2d 人像模式在 iPhone 上不起作用
Cocos2d portrait mode not working on iPhone(Cocos2d 人像模式在 iPhone 上不起作用)...
2024-08-12 移动开发问题
2

为什么 xcode 归档成功但创建一个空的 .xcarchive 文件?
Why does xcode archive succeed but create an empty .xcarchive file?(为什么 xcode 归档成功但创建一个空的 .xcarchive 文件?)...
2024-08-12 移动开发问题
2

OpenGL vs Cocos2d:选择什么?
OpenGL vs Cocos2d: What to choose?(OpenGL vs Cocos2d:选择什么?)...
2024-08-12 移动开发问题
6