IOS 1 duplicate symbol for architecture armv7 - ios

I have following log in log console.How can I get rid of this?
duplicate symbol _DeviceSystemMajorVersion in:
/Users/byteera/Library/Developer/Xcode/DerivedData/18_carati-esuxxyrbnzcfuwfkmqrndokpuzlr/Build/Intermediates/18 carati.build/Debug-iphoneos/18 carati.build/Objects-normal/armv7/NMRangeSlider.o
/Users/byteera/Library/Developer/Xcode/DerivedData/18_carati-esuxxyrbnzcfuwfkmqrndokpuzlr/Build/Intermediates/18 carati.build/Debug-iphoneos/18 carati.build/Objects-normal/armv7/Stepped_Slider_Bar.o
ld: 1 duplicate symbol for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is Stepped_Slider_Bar your custom view? Trying to declare the _DeviceSystemMajorVersion with a prefix:
// Stepped_Slider_Bar.m
#define SteppedSliderBar_DeviceSystemMajorVersion xxxx

Related

Admob causing Apple Mach-O Linker Error when trying to archive project

When project is working fine when I try to run in simulator. However, when I try to archive the project, I got the follow error. The code is too long. I just putting some part of it.
duplicate symbol l017 in:
GoogleMobileAds.framework/GoogleMobileAds(GADBannerAdViewDelegate.o)
GoogleMobileAds(GADRewardBasedVideoAd+Mediation.o)
duplicate symbol l018 in:
GoogleMobileAds.framework/GoogleMobileAds(GADCSITimeRecorder.o)
GoogleMobileAds.framework/GoogleMobileAds(GADRewardBasedVideoAd+Mediation.o)
duplicate symbol l008 in:
GoogleMobileAds.framework/GoogleMobileAds(GADNativeAdAttributionView.o)
GoogleMobileAds.framework/GoogleMobileAds(GADPushTransitionView.o)
duplicate symbol l014 in:
GoogleMobileAds.framework/GoogleMobileAds(GADPinger.o)
GoogleMobileAds.framework/GoogleMobileAds(GADAdAppViewController.o)
ld: 28 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How to solve this?
Problem solved by removing the "-ObjC" linker flag.

linker command failed with exit code 1 (use -v to see invocation

I am getting the following linking error in Xcode 6. Any ideas how to solve this
duplicate symbol _OBJC_IVAR_$_SCClip._m4g1c in:
/Users/Abdul/Library/Developer/Xcode/DerivedData/SoundCandy-bwekfiwyyjgmwhbgztfrqedobxxn/Build/Intermediates/SoundCandy.build/Debug-iphonesimulator/SoundCandyTests.build/Objects-normal/x86_64/SCClip-F338C753334EE43A.o
duplicate symbol _SCCLIP_INPUT_TOKEN in:
/Users/Abdul/Library/Developer/Xcode/DerivedData/SoundCandy-bwekfiwyyjgmwhbgztfrqedobxxn/Build/Intermediates/SoundCandy.build/Debug-iphonesimulator/SoundCandyTests.build/Objects-normal/x86_64/SCClip-F338C753334EE43A.o
duplicate symbol _OBJC_CLASS_$_SCClip in:
/Users/Abdul/Library/Developer/Xcode/DerivedData/SoundCandy-bwekfiwyyjgmwhbgztfrqedobxxn/Build/Intermediates/SoundCandy.build/Debug-iphonesimulator/SoundCandyTests.build/Objects-normal/x86_64/SCClip-F338C753334EE43A.o
duplicate symbol _OBJC_METACLASS_$_SCClip in:
/Users/Abdul/Library/Developer/Xcode/DerivedData/SoundCandy-bwekfiwyyjgmwhbgztfrqedobxxn/Build/Intermediates/SoundCandy.build/Debug-iphonesimulator/SoundCandyTests.build/Objects-normal/x86_64/SCClip-F338C753334EE43A.o
ld: 4 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I fixed by selecting and deselecting target membership of the problematic file in the file inspector in Xcode

Duplicate Symbols causing Apple Mach-O Linker Error

I am receiving the following error when building my project.
duplicate symbol _OBJC_CLASS_$_PrintAdventureMenuViewController in:
/Users/ethanraymond/Library/Developer/Xcode/DerivedData/jake-and-bailey-fbutnsfforlfnpgkxyojdsdcaobc/Build/Intermediates/jake-and-bailey.build/Debug-iphonesimulator/jake-and-bailey.build/Objects-normal/i386/PrintAdventureMenuViewController.o
/Users/ethanraymond/Library/Developer/Xcode/DerivedData/jake-and-bailey-fbutnsfforlfnpgkxyojdsdcaobc/Build/Intermediates/jake-and-bailey.build/Debug-iphonesimulator/jake-and-bailey.build/Objects-normal/i386/AdventureTypeMenuViewController.o
duplicate symbol _OBJC_METACLASS_$_PrintAdventureMenuViewController in:
/Users/ethanraymond/Library/Developer/Xcode/DerivedData/jake-and-bailey-fbutnsfforlfnpgkxyojdsdcaobc/Build/Intermediates/jake-and-bailey.build/Debug-iphonesimulator/jake-and-bailey.build/Objects-normal/i386/PrintAdventureMenuViewController.o
/Users/ethanraymond/Library/Developer/Xcode/DerivedData/jake-and-bailey-fbutnsfforlfnpgkxyojdsdcaobc/Build/Intermediates/jake-and-bailey.build/Debug-iphonesimulator/jake-and-bailey.build/Objects-normal/i386/AdventureTypeMenuViewController.o
ld: 2 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This was just after creating "PrintAdventureMenuViewController" class. So it is currently empty. "AdventureTypeMenuViewController" is not empty. It is populated with views other code.
My problem was that in the AdventureTypeMenuViewController.m file I used the import statement...
#import "PrintAdventureMenuViewController.m"
rather than...
#import "PrintAdventureMenuViewController.h"

Linker Command Failed

duplicate symbol __Z13createDustVFXPN7cocos2d6CCNodeEff in:
/Users/SrinivasJ/Library/Developer/Xcode/DerivedData/Race-fahplwvpmjymyegjbzoghrjofgou/Build/Intermediates/Race.build/Debug-iphonesimulator/Race.build/Objects-normal/i386/AIBike.o
/Users/SrinivasJ/Library/Developer/Xcode/DerivedData/Race-fahplwvpmjymyegjbzoghrjofgou/Build/Intermediates/Race.build/Debug-iphonesimulator/Race.build/Objects-normal/i386/Bike.o
ld: 1 duplicate symbol for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
above error i got. i find the duplicate method in both class "createDustVFX"
and i changed method name. its working fine.
but want to know why its given duplicate symbol error.
both class are in different folder. no connection with each Classes.

-ObjC linker flag - When trying to add it to "Other Linker Flags" I get an error

I'm trying to add the facebook SDK 3.2 to my app but after I add the -ObjC linker flag (as described in their video) I get a lot of duplicates warnings and I can't run the app with the error:
duplicate symbol _OBJC_IVAR_$_GAI.defaultTracker_ in:
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics.a(GAI.o)
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics_debug.a(GAI.o)
duplicate symbol _OBJC_IVAR_$_GAI.dispatcher_ in:
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics.a(GAI.o)
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics_debug.a(GAI.o)
duplicate symbol _kGAIProduct in:
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics.a(GAI.o)
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics_debug.a(GAI.o)
duplicate symbol _kGAIVersion in:
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics.a(GAI.o)
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics_debug.a(GAI.o)
duplicate symbol _OBJC_IVAR_$_GAI.trackUncaughtExceptions_ in:
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics.a(GAI.o)
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics_debug.a(GAI.o)
/Users/gool/Documents/FacebookSDK/FacebookSDK.framework/FacebookSDK(Facebook.o)
ld: 172 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks
Deleting libGoogleAnalytics_debug.a and the facebook old sdk solved my problem

Resources