簡體   English   中英

使用多個框架會產生clang:錯誤:鏈接器命令失敗,退出代碼為1

[英]Using multiple frameworks gives clang: error: linker command failed with exit code 1

就像我說的..我正在使用兩個框架,FlashIz和MWPhotoBrowser。 (實際上,我使用的更多,但它們不會出錯。)

在構建項目時,出現如下錯誤:

    Ld /Users/Korneel/Library/Developer/Xcode/DerivedData/gTicket-grnuygifaetsfmbdncixojogumle/Build/Products/Debug-iphoneos/gTicket.app/gTicket normal armv7
    cd /Users/Korneel/Documents/stage-genius/trunk/IOS/gTicket
    export IPHONEOS_DEPLOYMENT_TARGET=6.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.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 armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -L/Users/Korneel/Library/Developer/Xcode/DerivedData/gTicket-grnuygifaetsfmbdncixojogumle/Build/Products/Debug-iphoneos -F/Users/Korneel/Library/Developer/Xcode/DerivedData/gTicket-grnuygifaetsfmbdncixojogumle/Build/Products/Debug-iphoneos -F/Users/Korneel/Documents/stage-genius/trunk/IOS/gTicket/FlashizEmbeddedLibrary.embeddedframwork -filelist /Users/Korneel/Library/Developer/Xcode/DerivedData/gTicket-grnuygifaetsfmbdncixojogumle/Build/Intermediates/gTicket.build/Debug-iphoneos/gTicket.build/Objects-normal/armv7/gTicket.LinkFileList -dead_strip -all_load -ObjC -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.0 /Users/Korneel/Library/Developer/Xcode/DerivedData/gTicket-grnuygifaetsfmbdncixojogumle/Build/Products/Debug-iphoneos/libMWPhotoBrowser.a -framework MapKit -framework AssetsLibrary -framework MessageUI -framework FlashizEmbeddedLibrary -framework ImageIO -framework SystemConfiguration -framework QuartzCore /Users/Korneel/Library/Developer/Xcode/DerivedData/gTicket-grnuygifaetsfmbdncixojogumle/Build/Products/Debug-iphoneos/libTapkuLibrary.a -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/Korneel/Library/Developer/Xcode/DerivedData/gTicket-grnuygifaetsfmbdncixojogumle/Build/Intermediates/gTicket.build/Debug-iphoneos/gTicket.build/Objects-normal/armv7/gTicket_dependency_info.dat -o /Users/Korneel/Library/Developer/Xcode/DerivedData/gTicket-grnuygifaetsfmbdncixojogumle/Build/Products/Debug-iphoneos/gTicket.app/gTicket

duplicate symbol _OBJC_IVAR_$_MBProgressHUD.mode in:
    /Users/Korneel/Library/Developer/Xcode/DerivedData/gTicket-grnuygifaetsfmbdncixojogumle/Build/Products/Debug-iphoneos/libMWPhotoBrowser.a(MBProgressHUD.o)
    /Users/Korneel/Documents/stage-genius/trunk/IOS/gTicket/FlashizEmbeddedLibrary.embeddedframwork/FlashizEmbeddedLibrary.framework/FlashizEmbeddedLibrary(MBProgressHUD.o)



ld: 29 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

因此,我從這個錯誤中得出了那兩個框架正在使用相同的“框架”(例如MBProgressHUD)的信息。 所以我想刪除其中之一? 但是我不知道怎么辦。有人嗎? 問題是,我似乎找不到此文件?

這里的問題是重復 MBProgressHUD已添加兩次(來自libMWPhotoBrowser.aFlashizEmbeddedLibrary

因此,從任何一個庫中刪除。

它表明這是由於重復的符號。 在您的項目中,有MBProgressHUD多個類。 請僅使用一個類,並刪除其他類。 這樣可以解決您的問題,

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM