[英]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. 就像我说的..我正在使用两个框架,FlashIz和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. 因此,我从这个错误中得出了那两个框架正在使用相同的“框架”(例如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
) MBProgressHUD
已添加两次(来自libMWPhotoBrowser.a
和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
. 在您的项目中,有
MBProgressHUD
多个类。 Please use only one class and remove other. 请仅使用一个类,并删除其他类。 This will resolve your problem,
这样可以解决您的问题,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.