链接armv7时出错而不运行IOS DEVICE

时间:2012-04-11 12:24:49

标签: armv7 ios-frameworks

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

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

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)

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

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

TNX

1 个答案:

答案 0 :(得分:0)

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