報錯
今天又遇到的一種情況,相同的報錯,不一樣的原因。
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。