使用多个框架给了clang:错误:linker命令以退出代码1失败。

时间:2023-01-21 16:34:38

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

就像我说的. .我使用了两个框架,FlashIz和MWPhotoBrowser。(实际上我用得更多,但他们不会出错。)

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?

因此,我从这个错误中得出这两个框架使用相同的“框架”,如MBProgressHUD。我想去掉其中的1个?但我不知道怎么…有没有人有类似的问题?问题是,我好像找不到这些文件?

2 个解决方案

#1


2  

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

问题是重复。MBProgressHUD已经添加了两次(来自libMWPhotoBrowser)。一个和FlashizEmbeddedLibrary)

So Remove from any one of those libs.

所以要从这些libs中移除。

#2


0  

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,

它显示它是由于重复的符号。在您的项目中有多个MBProgressHUD类。请只使用一个类并删除其他类。这将解决你的问题,

#1


2  

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

问题是重复。MBProgressHUD已经添加了两次(来自libMWPhotoBrowser)。一个和FlashizEmbeddedLibrary)

So Remove from any one of those libs.

所以要从这些libs中移除。

#2


0  

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,

它显示它是由于重复的符号。在您的项目中有多个MBProgressHUD类。请只使用一个类并删除其他类。这将解决你的问题,