23 duplicate symbols for architecture i386

lkycan發表於2017-12-14

ContactController.o ld: 23 duplicate symbols for architecture i386

完整錯誤:

/ContactController.o
ld: 23 duplicate symbols for architecture i386

解析:

ContactController.old:23複製符號為i386架構

通俗話講ContactController這個類被重複實現;

uplicate symbol _OBJC_IVAR_$_ContactController._curDelIndexPath in:
    /Users/moran/Library/Developer/Xcode/DerivedData/Yoosee-bxnxtnsaiafcbndoyfmzjcxgtqgi/Build/Intermediates/Yoosee.build/Debug-iphonesimulator/Yoosee.build/Objects-normal/i386/MainController.o
 
 /Users/moran/Library/Developer/Xcode/DerivedData/Yoosee-bxnxtnsaiafcbndoyfmzjcxgtqgi/Build/Intermediates/Yoosee.build/Debug-iphonesimulator/Yoosee.build/Objects-normal/i386/ContactController.o
ld: 23 duplicate symbols for architecture i386

看上一個錯誤提示: MainController 實在MainController裡面匯入了ContactController.m檔案。

還有一種情況,就是某個實現檔案在專案裡面出現了多一份。

相關文章