简体   繁体   中英

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

Like I'm saying.. I'm using two frameworks, FlashIz and MWPhotoBrowser. (Actually I'm using more, but they don't give errors..)

When building the project, I got errors like this:

    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)

So, I derived from this error that those two frameworks are using the same 'frameworks' like MBProgressHUD. So I thought of removing 1 of those? But I don't know how.. Is there anyone who had a similar problem? The problem is, I can't seem to find this files?

Problem here is duplication . MBProgressHUD have added twice(from libMWPhotoBrowser.a and FlashizEmbeddedLibrary )

So Remove from any one of those libs.

It is showing that it was due to duplicate symbol. In your project there are multiple classes of MBProgressHUD . Please use only one class and remove other. This will resolve your problem,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM