IOS开发报错之Undefined symbols for architecture armv6
本文转载至 http://blog.csdn.net/sanpintian/article/details/7575434
今天在项目中引入SVSegmentedControl.h/.my以及SVSSegmentedThumb.h/.m之后应用引入类,编译时候报错
Undefined symbols for architecture armv6:
"_OBJC_CLASS_$_SVSegmentedControl", referenced from:
objc-class-ref in SVSegmentedControl.o
ld: symbol(s) not found for architecture armv6
Undefined symbols for architecture armv6:
"_OBJC_CLASS_$_SVSSegmentedThumb", referenced from:
objc-class-ref in SVSSegmentedThumb.o
ld: symbol(s) not found for architecture armv6
这种情况一般是库引用的问题,解决办法选择工程的TARGETS-->Build Phases-->Link Binary With Libraries 点击“+”图标添加对应的库。
但是在此地的原因其实也是这样,编译时候找不到对应的类,所以需要我们在Build Phases-->Compile Sources中手动添加SVSegmentedControl.my以及SVSSegmentedThumb.m两项,之后clean项目,重新编译即可。