2

我在这一点上迷路了。:( 该应用程序运行良好 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)。任何帮助将不胜感激。谢谢!!!

4

2 回答 2

1

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

于 2011-07-29T11:44:22.263 回答
0

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

Framework Search Paths 项目包含对4.3 SDK路径的旧引用,这些引用在我升级到SDK 5.0.

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

于 2012-01-18T22:54:10.673 回答