Malformed metadata record for architecture i386

与世无争的帅哥 提交于 2019-12-11 04:36:54

问题


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**

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?


回答1:


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

  • 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

  • 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

  • Changed the iOS Deployment target from iOS 3.1 to iOS 4.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.



来源:https://stackoverflow.com/questions/7809876/malformed-metadata-record-for-architecture-i386

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!