“ld: symbol(s) not found for architecture i386”...

missing required architecture i386 in file Undefined symbols for architecture i386:   "_OBJC_CLASS_$_OBLinear", referenced from:   objc-class-ref in MyViewBarcode.o ld: symbol(s) not found for architecture i386

今天碰到了相似与上述的错误,花了不少时间来解决这个问题,所以总结下: ui

相似上面的的错误,通常是库的问题,通常解决办法以下: spa

一、检查工程设置Search Paths里的Framework Search Paths、Header Search Paths、Library Search Paths的路径设置,看设置路径是否正确,另外还要注意里边是否多余一些不肯定的路径,我就是由于设置里不知道怎么回事多了几条奇怪的路径致使Xcode报上述错误;结果,搞了我半天,真的是半天,时间彻底浪费了。。。。。。 code

二、注意检查是否将库添加进工程里,添加的库分为模拟器、真机和混合版的 get

三、注意检查库跟前台的工程设置的Build Products Path和Intermediate Build Files Path项下的build文件路径要一致; it

上述设置要工程设置跟target一块儿设置生效。 io

相关文章
相关标签/搜索