我的项目,在iPhone5s模拟器上运行正常,但iPhone5编译错误,出现如下错误信息:
ld: warning: directory not found for option '-L/Users/apple/Desktop/……/UMSocial_Sdk_3.3.7'
ld: warning: ignoring file /Users/apple/Desktop/……_SDK/lib/libP2P_device.a, missing required architecture i386 in file /Users/apple/Desktop/……_SDK/lib/libP2P_device.a (2 slices)
ld: warning: ignoring file /Users/apple/Desktop/……/UMAnalytics_Sdk/libMobClickLibrary_armv6.a, file was built for archive which is not the architecture being linked (i386): /Users/apple/Desktop/……_Sdk/libMobClickLibrary_armv6.a
ld: warning: ignoring file /Users/apple/Desktop/……_iOS_SDK/lib/libP2P.a, file was built for archive which is not the architecture being linked (i386): /Users/apple/Desktop/……2P.a
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_InterfaceJump", referenced from:
objc-class-ref in CommonFunc.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
答案 0 :(得分:-1)
您的项目链接某些文件并不支持i386架构。也许这个文件只是支持arm架构。
你应该确保你的"构建设置" - > "有效架构"没有包含i386。 iPhone5的架构是" armv7",它不应该为架构i386编译。
如果您只是想构建目标手机架构,可以设置"仅构建主动架构"是的。
对不起,我认为您的iPhone5是设备,您可以尝试更改" Valid Architecture"仅支持64位或32位arm架构,并且仅更改“仅构建活动架构”#34;试一试。
iPhone5模拟器构建正常,而iPhone5s构建失败通常是arm64问题。