Linking globals named 'fbad_Cocos2DGetGLViewController': symbol multiply defined - ios

"ld: Linking globals named 'fbad_Cocos2DGetGLViewController': symbol
multiply defined! for architecture arm64 clang: error: linker command
failed with exit code 1 (use -v to see invocation)"
I'm getting this error in XCode build project have two SDKs "GoogleAdMob SDK Unity" and "FacebookAudienceNetwork" Unity.
Deleting -ObjC flag from other linker flags won’t work for me.
Is there anybody can help me fix that issue?
Single SDK build either its GoogleAdMOb Unity or FacebookAudienceNetwork Unity don't have any issue.
Adding both generate this error:
""ld: Linking globals named 'fbad_Cocos2DGetGLViewController': symbol
multiply defined! for architecture arm64"

Related

duplicate symbol ___llvm_profile_runtime in

I am implementing Exact target SDK v5.1.1 as mention on link. But encounter an issue as bellow
duplicate symbol ___llvm_profile_runtime in:
/Applications/Xcode 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.1.0/lib/darwin/libclang_rt.profile_iossim.a(InstrProfilingRuntime.cc.o)
/Users/abhijeetb/Documents/Projects/BitBucket/FixIssue/project_folder/project_name/MarketingCloudSDK/MarketingCloudSDK.framework/MarketingCloudSDK(__llvm_profile_runtime.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
In our project, we have -all_load in other linking flag along with -Obj-C, -lc++, -lz, -liconv, If I remove -all_load flag then issue will not occur but not sure about the consequences.
Please guid me to resolved the issue.
Click on your project in Xcode and go to Build phases.
Look for __llvm_profile_runtime.o in compile sources and click on it and remove it from compile sources
Check to see that you aren't compiling the same file more than once.
If you search for __llvm_profile_runtime it should only show up once

linker command failed: duplicate symbol for architecture arm64

I am having this error while running my project. I referred so many answers and did the same but can't resolve this issue.
duplicate symbol _kReachabilityChangedNotification in:
/Users/admin/Downloads/workRepo/SafetraxApp/MAppIOS/build2/Safetrax/Build/Intermediates/Safetrax.build/Debug-iphoneos/Parent App.build/Objects-normal/arm64/Reachability.o
Pods/catapush-ios-sdk-pod/CatapushKit/libCatapushLib.a(CLIntReachability.o)
ld: 1 duplicate symbol for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I assume you are using the Reachability snippet from Apple. Unfortunately, that piece of code and the accompanying constants are being used in several Cocoapods. That's what causes this error. It basically means that the symbol/constant kReachabilityChangedNotification has been defined twice in your binary: once in your Application and once in the CatapushKit pod.
The easiest way to fix is: Rename the constant in your code. The other option would be to delete the Reachbility code from your app and use the CLIntReachability implementation from CatapushKit.

Apple Mach-O Linker Error - duplicate symbols for architecture x86_64

I have tried all the answers available on stackoverflow but nothing seems to be working.
I get the following error whenever i create a (TCRecord)subclass of MMRecord.
Error:
duplicate symbol _MMRecordErrorDomain in:
/Users/mavericks/Library/Developer/Xcode/DerivedData/Beered-efrmoegppszsqtbcbtfrytgkdlyy/Build/Intermediates/Beered.build/Debug-iphonesimulator/Beered.build/Objects-normal/x86_64/TCRecord.o
/Users/mavericks/Library/Developer/Xcode/DerivedData/Beered-efrmoegppszsqtbcbtfrytgkdlyy/Build/Products/Debug-iphonesimulator/libPods-MMRecord.a(MMRecord.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Things i have already tried:
Tried removing the -ObjC in other linker flags
I have already checked the directory for any duplicate files
Under Compile sources there is no duplication of implementation files.
Third party library i am using :
MMRecord
https://github.com/mutualmobile/MMRecord
For now, in your project settings, search for "gcc_no" and set the flag to NO until we get the issue fixed. That should allow you to build your project.
Try deleting extra frameworks that have no use.

DocuSign iOS SDK - remove CMPopTipView from dependency

Both My project and DocuSign project are using CMPopTipView open source code. Due that I facing following error during runtime.
Build/Products/Debug-iphoneos/libPods-CMPopTipView.a(CMPopTipView.o)
duplicate symbol _OBJC_METACLASS_$_CMPopTipView in:
/Users/Mani/Library/Developer/Xcode/DerivedData/myApp-cwzhebmptltodqbylbytaqjfetaa/Build/Intermediates/myApp.build/Debug-iphoneos/myApp.build/Objects-normal/arm64/CMPopTipView.o
/Users/Mani/Library/Developer/Xcode/DerivedData/myApp-cwzhebmptltodqbylbytaqjfetaa/Build/Products/Debug-iphoneos/libPods-CMPopTipView.a(CMPopTipView.o)
ld: 34 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Is there a way to remove dependency of DocuSignSDK for CMPopTipView and set it to use one present in my code base? if yes how?
Thanks,
Mani

Linker error with Facebook SDK v3.12

I'm trying add a few social networks skds to my project. I've started from Facebook SDK and all works fine. But when I added a google+ sdk and added -ObjC flag, compile start failing with next error:
/Users/developer/Documents/Projects/iOS/FacebookSDK.framework/FacebookSDK(Facebook.o)
ld: 49 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
But when I remove this flag, compile going good. What should I do in this situation?
if some framework or lib required flags (-all_Load or -ObjC) you can load this special libs with Other Linker Flag like this one
-force_load "$(BUILT_PRODUCTS_DIR)/libRestKit.a"
don't remember exclude this lib from target to avoid symbol duplication

Resources