报错
今天又遇到的一种情况,相同的报错,不一样的原因。
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_Student", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
原因
.h里声明了一个@interface,但.m没有进行@implementation。
解决方法
.m里进行@implementation。