Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
297 views
in Technique[技术] by (71.8m points)

iphone - 6 duplicate symbols for architecture i386

duplicate symbol _OBJC_METACLASS_$_SBJsonParser in:
    /Users/Gaditek/Library/Developer/Xcode/DerivedData/DietBet-gyhoyhmdrobtqregldjyixtgmize/Build/Intermediates/DietBet.build/Debug-iphonesimulator/DietBet.build/Objects-normal/i386/SBJsonParser.o
    /Users/Gaditek/Desktop/AliMaisamProjects/Dietbet/DietBet/libfacebook_ios_sdk.a(SBJsonParser.o)
duplicate symbol _OBJC_CLASS_$_SBJsonParser in:
    /Users/Gaditek/Library/Developer/Xcode/DerivedData/DietBet-gyhoyhmdrobtqregldjyixtgmize/Build/Intermediates/DietBet.build/Debug-iphonesimulator/DietBet.build/Objects-normal/i386/SBJsonParser.o
    /Users/Gaditek/Desktop/AliMaisamProjects/Dietbet/DietBet/libfacebook_ios_sdk.a(SBJsonParser.o)
duplicate symbol _OBJC_IVAR_$_SBJsonWriter.sortKeys in:
    /Users/Gaditek/Library/Developer/Xcode/DerivedData/DietBet-gyhoyhmdrobtqregldjyixtgmize/Build/Intermediates/DietBet.build/Debug-iphonesimulator/DietBet.build/Objects-normal/i386/SBJsonWriter.o
    /Users/Gaditek/Desktop/AliMaisamProjects/Dietbet/DietBet/libfacebook_ios_sdk.a(SBJsonWriter.o)
duplicate symbol _OBJC_IVAR_$_SBJsonWriter.humanReadable in:
    /Users/Gaditek/Library/Developer/Xcode/DerivedData/DietBet-gyhoyhmdrobtqregldjyixtgmize/Build/Intermediates/DietBet.build/Debug-iphonesimulator/DietBet.build/Objects-normal/i386/SBJsonWriter.o
    /Users/Gaditek/Desktop/AliMaisamProjects/Dietbet/DietBet/libfacebook_ios_sdk.a(SBJsonWriter.o)
duplicate symbol _OBJC_METACLASS_$_SBJsonWriter in:
    /Users/Gaditek/Library/Developer/Xcode/DerivedData/DietBet-gyhoyhmdrobtqregldjyixtgmize/Build/Intermediates/DietBet.build/Debug-iphonesimulator/DietBet.build/Objects-normal/i386/SBJsonWriter.o
    /Users/Gaditek/Desktop/AliMaisamProjects/Dietbet/DietBet/libfacebook_ios_sdk.a(SBJsonWriter.o)
duplicate symbol _OBJC_CLASS_$_SBJsonWriter in:
    /Users/Gaditek/Library/Developer/Xcode/DerivedData/DietBet-gyhoyhmdrobtqregldjyixtgmize/Build/Intermediates/DietBet.build/Debug-iphonesimulator/DietBet.build/Objects-normal/i386/SBJsonWriter.o
    /Users/Gaditek/Desktop/AliMaisamProjects/Dietbet/DietBet/libfacebook_ios_sdk.a(SBJsonWriter.o)
ld: 6 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Please tell me how to fix this issue?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

As you can see the linker complains that SBJsonWriter and SBJsonParser are both defined in libfacebook_ios_sdk.a and as individual files in your project.

You cannot really solve the problem except removing the individual files from your target.

The problem is that the developers of libfacebook_ios_sdk.a thought it would be a good idea to use the json framework (not caring for clashes with code used in the host app). This is a common problem with SDKs on iOS.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...