Undefined symbols for architecture armv7: "_OBJC_CLASS_$XXController", referenced from: objc-class-ref in XXViewController.o ld: symbol(s) not found for architecture armv7

今天碰到的这个错误:

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_XXController", referenced from:
  objc-class-ref in XXViewController.o
ld: symbol(s) not found for architecture armv7
3.37.22.png

我的解决方式: 现在在同一个工程分了多个版本导致的,切换版本时对应控制器的target membership没有设置。如图选择就可以了:

Undefined symbols for architecture armv7:
3.33.59.png

你可能感兴趣的:(Undefined symbols for architecture armv7: "_OBJC_CLASS_$XXController", referenced from: objc-class-ref in XXViewController.o ld: symbol(s) not found for architecture armv7)