duplicate symbol _OBJC_CLASS_$_TWTableViewController in
今天把老專案中的幾個類提取出來發現一直編譯不通過
duplicate symbol _OBJC_CLASS_$_TWTableViewController in:
/Users/taowai/Library/Developer/Xcode/DerivedData/cehua-ggvtgfqynwpwsycwvhupbglyurap/Build/Intermediates/cehua.build/Debug-iphonesimulator/cehua.build/Objects-normal/x86_64/TWMainViewController.o
/Users/taowai/Library/Developer/Xcode/DerivedData/cehua-ggvtgfqynwpwsycwvhupbglyurap/Build/Intermediates/cehua.build/Debug-iphonesimulator/cehua.build/Objects-normal/x86_64/TWTableViewController.o
duplicate symbol _OBJC_METACLASS_$_TWTableViewController in:
/Users/taowai/Library/Developer/Xcode/DerivedData/cehua-ggvtgfqynwpwsycwvhupbglyurap/Build/Intermediates/cehua.build/Debug-iphonesimulator/cehua.build/Objects-normal/x86_64/TWMainViewController.o
/Users/taowai/Library/Developer/Xcode/DerivedData/cehua-ggvtgfqynwpwsycwvhupbglyurap/Build/Intermediates/cehua.build/Debug-iphonesimulator/cehua.build/Objects-normal/x86_64/TWTableViewController.o
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
然後上網檢查了半天,發現是在import時把.h檔案寫成.m檔案了。
#import "TWMainViewController.h"
#import "TWTableViewController.m"
這個因為有自動提示功能,所以寫程式碼的時候一定要細心。
相關文章
- [Javascript] Symbol vs Symbol.forJavaScriptSymbol
- SymbolSymbol
- "_OBJC_CLASS_$_XXX", referenced from:OBJ
- JavaScript SymbolJavaScriptSymbol
- JavaScript Symbol物件JavaScriptSymbol物件
- Symbol 的作用Symbol
- Symbol.for() 方法Symbol
- Symbol.iteratorSymbol
- Symbol詳解Symbol
- ES6 symbol 以及symbol的簡單應用Symbol
- _OBJC_CLASS_$_某檔名", referenced from:的問題OBJ
- Symbol toString() 方法Symbol
- es6 symbolSymbol
- JS 中的 SymbolJSSymbol
- Symbol 及其 屬性Symbol
- javascript中的symbolJavaScriptSymbol
- 解決OBJC_CLASS_$_MBProgressHUD無法引用的問題OBJ
- psql: symbol lookup error: ./psql: undefined symbol: PQsetErrorContextVisibilitySQLSymbolErrorUndefinedContext
- duplicate databaseDatabase
- Symbol資料型別Symbol資料型別
- Symbol 的作用[翻譯]Symbol
- Symbol.keyFor() 方法Symbol
- ES6之symbolSymbol
- Yet Another Intro for SymbolSymbol
- Symbol.species 屬性Symbol
- Symbol.match 屬性Symbol
- Symbol.replace 屬性Symbol
- Symbol.search 屬性Symbol
- Symbol.split 屬性Symbol
- Symbol.toPrimitive 屬性SymbolMIT
- Symbol.unscopables 屬性Symbol
- ABAP指標field symbol!指標Symbol
- RMAN duplicate databaseDatabase
- iconfontのsymbol的使用Symbol
- es6-symbol的用法Symbol
- 解決 Too many symbol filesSymbol
- ES6 - symbol&generatorSymbol
- Symbol.hasInstance 屬性Symbol