获得Apple Mach-O链接器错误 - 尝试构建时[如果我清理项目没有错误但是当我尝试构建它时它再次出现!]

时间:2015-07-14 05:38:32

标签: objective-c core-data

使用核心数据,我试图创建一个简单的乳品应用程序。但是当我尝试编译时,我得到的错误如下:

Apple Mach-O Linker Error 
Linker command failed with exit code 1 (use -v to see invocation)

为了解决这个问题,我删除了所有额外的代码并清理了代码,并通过以下链接尝试了很多方法:Apple Mach-O Linker Error when compiling for device但仍然没有解决方案。

完整错误如下:

d /Users/me/Library/Developer/Xcode/DerivedData/DiaryPlularSight-ghxpecfcxggqophakawbugnhrnic/Build/Products/Debug-iphonesimulator/DiaryPlularSight.app/DiaryPlularSight normal x86_64
    cd /Users/me/Desktop/iOS/DiaryPlularSight
    export IPHONEOS_DEPLOYMENT_TARGET=8.4
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.4.sdk -L/Users/me/Library/Developer/Xcode/DerivedData/DiaryPlularSight-ghxpecfcxggqophakawbugnhrnic/Build/Products/Debug-iphonesimulator -F/Users/me/Library/Developer/Xcode/DerivedData/DiaryPlularSight-ghxpecfcxggqophakawbugnhrnic/Build/Products/Debug-iphonesimulator -filelist /Users/me/Library/Developer/Xcode/DerivedData/DiaryPlularSight-ghxpecfcxggqophakawbugnhrnic/Build/Intermediates/DiaryPlularSight.build/Debug-iphonesimulator/DiaryPlularSight.build/Objects-normal/x86_64/DiaryPlularSight.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.4 -Xlinker -dependency_info -Xlinker /Users/me/Library/Developer/Xcode/DerivedData/DiaryPlularSight-ghxpecfcxggqophakawbugnhrnic/Build/Intermediates/DiaryPlularSight.build/Debug-iphonesimulator/DiaryPlularSight.build/Objects-normal/x86_64/DiaryPlularSight_dependency_info.dat -o /Users/me/Library/Developer/Xcode/DerivedData/DiaryPlularSight-ghxpecfcxggqophakawbugnhrnic/Build/Products/Debug-iphonesimulator/DiaryPlularSight.app/DiaryPlularSight

duplicate symbol _DiaryEntryMoode in:
    /Users/me/Library/Developer/Xcode/DerivedData/DiaryPlularSight-ghxpecfcxggqophakawbugnhrnic/Build/Intermediates/DiaryPlularSight.build/Debug-iphonesimulator/DiaryPlularSight.build/Objects-normal/x86_64/NewEntryViewController.o
    /Users/me/Library/Developer/Xcode/DerivedData/DiaryPlularSight-ghxpecfcxggqophakawbugnhrnic/Build/Intermediates/DiaryPlularSight.build/Debug-iphonesimulator/DiaryPlularSight.build/Objects-normal/x86_64/Diary.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

更新:刚刚添加了Project文件夹图片 enter image description here

1 个答案:

答案 0 :(得分:0)

在Compile Sources ::: NewEntryViewController Diary

中检查这两个文件