无法使用解析库:解析链接器警告:文件是为不支持的文件格式构建的 [英] Unable to use Parse library: Parse linker warning: file was built for unsupported file format

查看:178
本文介绍了无法使用解析库:解析链接器警告:文件是为不支持的文件格式构建的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于未加载符号,因此我无法使用Parse,尝试插入#import会导致找不到文件错误.我遵循了Parse网站上现有项目的快速入门指南,并添加了所有必需的库(例如AudioToolbox Framework等),所以这不是问题.

As a result symbols aren't being loaded and I cannot use Parse, trying to insert #import gives file not found error. I've followed the quickstart guide on the Parse site for an existing project and have added all the libraries required (e.g. AudioToolbox Framework, etc) so that's not the issue.

我得到的确切警告是:

ld:警告:忽略文件/Users/XXXXXXX/Documents/YYYYYYYY/Parse.framework/Parse,文件是为不支持的文件格式构建的(0x56 0x65 0x72 0x73 0x69 0x6F 0x6E 0x73 0x2F 0x43 0x75 0x72 0x72 0x65 0x6E不是要链接的体系结构(i386):/Users/XXXXXXX/Documents/YYYYYYYY/Parse.framework/Parse

ld: warning: ignoring file /Users/XXXXXXX/Documents/YYYYYYYY/Parse.framework/Parse, file was built for unsupported file format ( 0x56 0x65 0x72 0x73 0x69 0x6F 0x6E 0x73 0x2F 0x43 0x75 0x72 0x72 0x65 0x6E 0x74 ) which is not the architecture being linked (i386): /Users/XXXXXXX/Documents/YYYYYYYY/Parse.framework/Parse

该项目是在Xcode 5.02中创建的,目标是ios 6.1,请告知是否需要其他信息.我下载了Parse入门项目,并且构建良好,但是似乎设置了一些自定义体系结构,所以也许有一个构建设置可以尝试在项目中进行更改?

The project was created in Xcode 5.02 and is targeting ios 6.1, let me know if any further information is required. I downloaded the Parse starter project and that builds fine, but that seems to have some custom architecture set, so maybe there's a build setting I could try changing in my project?

推荐答案

我运行了命令

xcrun -sdk iphoneos lipo -info解析

xcrun -sdk iphoneos lipo -info Parse

得到

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo:无法确定以下结构类型:解析

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't figure out the architecture type of: Parse

因此,看起来好像添加框架会以某种方式破坏自身,或者是xcode 5错误.我删除了框架并重新添加了框架,该框架现在可以正常工作了,上面的命令给出了

So it looks like adding the framework somehow corrupted itself, or an xcode 5 bug. I removed the framework and re-added it and it's now working and the above command gives

胖文件中的体系结构:解析为:armv7 armv7s i386 arm64 x86_64

Architectures in the fat file: Parse are: armv7 armv7s i386 arm64 x86_64

这篇关于无法使用解析库:解析链接器警告:文件是为不支持的文件格式构建的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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