架构 i386 的格式错误的元数据记录 [英] Malformed metadata record for architecture i386

查看:22
本文介绍了架构 i386 的格式错误的元数据记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚从 Xcode 4 升级到 Xcode 4.2,现在在为模拟器构建时出现以下错误:

I just upgraded from Xcode 4 to Xcode 4.2 and now I'm getting the following error when building for the Simulator:

ld: in /Users/rstaicut/Library/Developer/Xcode/DerivedData/iphone/Build/Intermediates/iphone.build/QA Server-iphonesimulator/Project iPhone Debug.build/Objects-normal/i386/CartController.o, could not parse object file 

/Users/rstaicut/Library/Developer/Xcode/DerivedData/iphone/Build/Intermediates/iphone.build/QA Server-iphonesimulator/Project iPhone Debug.build/Objects-normal/i386/CartController.o: 

**Malformed metadata record for architecture i386**
**Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1**

需要注意的一点是,为了这次升级,我已将编译器更改为 LLVM GCC 4.2,并且我使用 armv6 和 armv7 作为架构.我只收到模拟器的这个错误,设备的构建完成.

One thing to note is that I've changed the compiler to LLVM GCC 4.2 for this upgrade and I'm using armv6 and armv7 for the architectures. I'm only getting this error for the Simulator, the build finishes for the device.

任何想法格式错误的元数据记录可能意味着什么?

Any ideas what malformed metadata record could mean?

推荐答案

让模拟器终于可以工作了.这些是我改变的东西:

Got the simulator to finally work. These are the things I changed:

  • 在 Project > Build Settings > Architectures > Valid Architectures 下我取出了 i386,只留下了 armv6 和 armv7.在架构下我只有 armv6 和 armv7

  • Under Project > Build Settings > Architectures > Valid Architectures I took out i386 and left only armv6 and armv7. Under architectures I only have armv6 and armv7

我将编译器从 LLVM GCC 4.2 更改为 Apple LLVM 编译器 3.0(在项目">构建设置">构建选项">C/C++/Objective-C 编译器"下

I changed the Compiler from LLVM GCC 4.2 to Apple LLVM compiler 3.0 (Under Project > Build Settings > Build Options > Compiler for C/C++/Objective-C

将 iOS 部署目标从 iOS 3.1 更改为 iOS 4.0

Changed the iOS Deployment target from iOS 3.1 to iOS 4.0

最后一步是按下验证设置"(底部中间的按钮).它会要求您将编译器的一些设置从 LLVM GCC 更改为 Apple LLVM Compiler 3.0.点击确定.

The last step was to press on "Validate settings" (the button in the middle on the bottom). It's going to ask you to change some settings for the compiler from LLVM GCC to Apple LLVM Compiler 3.0. Hit OK.

在那之后,我的模拟器开始神奇地工作.没有错误,但由于编译器的变化而产生大量警告.

My simulator started magically working after that. No errors, though plenty of warnings due to the change in compiler.

希望这对遇到此问题的其他人有所帮助.

Hope this helps anyone else who runs into this issue.

这篇关于架构 i386 的格式错误的元数据记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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