1

我今天早上醒来,我的文件“libz.dylib”是红色的,我无法编译我的项目。所以我尝试重新安装 Xcode 4.3,我能够再次导入库。

然后,当我尝试在设备上运行时,编译器给了我这 4 个警告和这个错误:

ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/lib/crt1.3.1.o, file was built for i386 which is not the architecture being linked (armv7)
ld: warning: ignoring file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/lib/libsqlite3.0.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/iPhoneSimulator5.0.sdk/usr/lib/libz.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/iPhoneSimulator5.0.sdk/usr/lib/libstdc++.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/iPhoneSimulator5.0.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/iPhoneSimulator5.0.sdk/usr/lib/libobjc.A.dylib, file was built for unsupported file format which is not the architecture being linked (armv7) for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我可以在模拟器上运行我的应用程序,但我无法在设备上编译。

我认为问题出在图书馆链接上。以前有人遇到过同样的问题吗?

肿瘤坏死因子

4

1 回答 1

0

我刚才遇到了类似的问题,并将我的构建设置与正在运行的项目(从早期版本的 xcode 导入)进行了比较。我注意到工作项目在“其他链接器标志”中没有设置任何内容,而我的非工作项目中设置了“-arch i386”。我删除了它,它似乎已经修复了它。我真的不知道为什么。

于 2012-04-13T17:32:03.343 回答