Xcode編譯錯誤提示:
Undefined symbols for architecture x86_64:"_OBJC_CLASS_$_XXX", referenced from:objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture x86_64?
clang: error: linker command failed with exit code 1 (use -v to see invocation)
發(fā)現(xiàn)問題:
以上代碼看起來一切正常,但是在編譯時
查看Xocde Compile Sources中參與編譯的文件:
可能的原因:
解決辦法:
1.文件創(chuàng)建或引入的時候注意勾選Targets
2.手動添加編譯文件