duplicate symbol _OBJC--clang: error: linker command failed with exit code 1 错误

问题重现:

duplicate symbol _OBJC_IVAR_$_AlertSettingModel.alert_pic in:

    /Users/zhangyu/Library/Developer/Xcode/DerivedData/MotherReminded-dpnpugyhxirkxiehqvdgrmbubwif/Build/Intermediates/MotherReminded.build/Debug-iphonesimulator/MotherReminded.build/Objects-normal/i386/AlertSettingModel-A10410F278E2923E.o

    /Users/zhangyu/Library/Developer/Xcode/DerivedData/MotherReminded-dpnpugyhxirkxiehqvdgrmbubwif/Build/Intermediates/MotherReminded.build/Debug-iphonesimulator/MotherReminded.build/Objects-normal/i386/AlertSettingModel-60D608B011C6E289.o

今天更新代码看到一个错误,几番周折范显示是代码中的targets的Build Phase中引入了重复的.m文件AlertSettingModel:

duplicate symbol _OBJC--clang: error: linker command failed with exit code 1 错误_第1张图片

解决办法:

去掉重复的.m文件引入即可


你可能感兴趣的:(ios,DUPLICATE,symbol,objC,Clang)