iOS 报错 Undefined symbols for architecture x86_64:解决方法

一,报错详情
Undefined symbols for architecture x86_64:

OBJC_CLASS$_Person”, referenced from:

OBJC_CLASS$_Dog in Dog.o

objc-class-ref in ViewController.o

OBJC_METACLASS$_Person”, referenced from:

OBJC_METACLASS$_Dog in Dog.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

二、解决方法
图一:
iOS 报错 Undefined symbols for architecture x86_64:解决方法_第1张图片

图2:在 build Phases 下操作如下(如果那个类有先删除,在添加)
iOS 报错 Undefined symbols for architecture x86_64:解决方法_第2张图片

你可能感兴趣的:(iOS)