錯誤-duplicate symbols for architecture i386框架
duplicate symbol _main in: /Users/mac/Library/Developer/Xcode/DerivedData/ItcastWeibo-ejradctorpweaxgnoyvyothlpxbj/Build/Intermediates/ItcastWeibo.build/Debug-iphonesimulator/ItcastWeibo.build/Objects-normal/i386/main-BCA160EE79D38D53.o /Users/mac/Library/Developer/Xcode/DerivedData/ItcastWeibo-ejradctorpweaxgnoyvyothlpxbj/Build/Intermediates/ItcastWeibo.build/Debug-iphonesimulator/ItcastWeibo.build/Objects-normal/i386/main-F335E396EB42357.o ld: 1 duplicate symbol for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: 1 duplicate symbol for architecture i386iphone
clang: error: linker command failed with exit code 1 (use -v to see invocation)ui
在編譯程序時,出現了上面的錯誤,ld: 1 duplicate symbol for architecture i386,看了下錯誤信息,沒有明確提出錯誤緣由,不過從字面意思分析理解,好像是重複衝突了,後來查找緣由,原來是在引入第三方框架時,第三方的框架代碼中有main入口方法,一個項目中不可能有兩個main入口吧。好鬱悶啊,折騰了很久終於發現這個低級的錯誤,刪除第三方框架中那一個main.m文件,ok了。spa
還有一種,Undefined symbols for architecture i386:code
說明缺乏某種框架,或者類。orm
根據提示進行添加某些框架或者類。ip
這兩種狀況通常在多我的進行開發,或者多個項目進行整合、複用代碼拷貝的時候,每每出現這種問題。開發