【问题标题】:Xcode4 App work fine on iPhoneSimulator,but build on Device got a armv6/7 error:(Xcode4 App 在 iPhoneSimulator 上运行良好,但在 Device 上构建时出现 armv6/7 错误:(
【发布时间】:2011-07-29 09:55:38
【问题描述】:

我在这一点上迷路了。 :( 该应用程序运行良好 iPhoneSimulator。 但是当我尝试在 Device(iphone4.3.1)(XCode4) 上构建时, 我收到以下错误:

当我选择标准(armv6 armv7)构建时:

    ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libxml2.dylib, file was built for unsupported file format which is not the architecture being linked (armv6) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libxml2.2.dylib, file was built for unsupported file format which is not the architecture being linked (armv6) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libz.1.2.3.dylib, file was built for unsupported file format which is not the architecture being linked (armv6) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/Developer/Library/PrivateFrameworks/DTMessageQueueing.framework/DTMessageQueueing, file was built for unsupported file format which is not the architecture being linked (armv6) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/Developer/Library/PrivateFrameworks/UIAutomation.framework/UIAutomation, file was built for unsupported file format which is not the architecture being linked (armv6) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libSystem.dylib, file was built for unsupported file format which is not the architecture being linked (armv6) 
ld: in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libobjc.A.dylib, file was built for unsupported file format which is not the architecture being linked (armv6) for architecture armv6 

当我选择 Optimized(armv7) 构建时:

ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libxml2.dylib, file was built for unsupported file format which is not the architecture being linked (armv7) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libz.1.2.3.dylib, file was built for unsupported file format which is not the architecture being linked (armv7) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/Developer/Library/PrivateFrameworks/DTMessageQueueing.framework/DTMessageQueueing, file was built for unsupported file format which is not the architecture being linked (armv7) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/Developer/Library/PrivateFrameworks/UIAutomation.framework/UIAutomation, file was built for unsupported file format which is not the architecture being linked (armv7) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libxml2.2.dylib, file was built for unsupported file format which is not the architecture being linked (armv7) 
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libSystem.dylib, file was built for unsupported file format which is not the architecture being linked (armv7) 
ld: in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/libobjc.A.dylib, file was built for unsupported file format which is not the architecture being linked (armv7) for architecture armv7 
collect2: ld returned 1 exit status 
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1 

任何人都可以提供有关如何解决此问题的任何指示。 对于架构 armv6 错误,我如何解决不受支持的文件格式,它不是被链接的架构 (armv6)。 任何帮助将不胜感激。 谢谢!!!

【问题讨论】:

  • 你解决了吗?

标签: iphone xcode4 armv7 armv6


【解决方案1】:

删除提及的库并使用目标“构建阶段”选项卡的“将二进制文件与库链接”部分中的“+”按钮重新添加它们。

【讨论】:

  • 这没有帮助。您还有其他想法吗?
  • 尝试检查所有构建设置以寻找不合适的东西?问题(我相信您已经发现)是 Xcode 在尝试为 iPhone 链接时正在查看模拟器框架。如果你完全卡住了,最后的手段是删除你的 .xcodeproj 文件并在 Xcode 中重建项目。
【解决方案2】:

我能够解决类似的问题,但检查/添加条目到应用程序的构建设置的搜索路径部分。

Framework Search Paths 项目包含对4.3 SDK 路径的旧引用,这些路径在我升级到SDK 5.0 之前可能是正确的。

不管有没有必要,我在 IOS Simulator 5.0 和 Any IOS SDK 下添加了条目,用于区分通过 iPhoneSimulator.PlatformiPhoneOS.Platform 目录的路径。

【讨论】:

    猜你喜欢
    • 2020-07-02
    • 1970-01-01
    • 1970-01-01
    • 2021-01-18
    • 2020-10-29
    • 2010-10-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多