I'm trying to add a leaderboard to my game by using OpenKit Framework. Following their documentation, I've added all the neccessay libs + framwork but the following errors occured :
duplicate symbol _OBJC_IVAR_$_AFOAuth1Client._applicationLaunchNotificationObserver in:
/Users/Sa7bi/Library/Developer/Xcode/DerivedData/helloworld-erlcedkitaorqobgauzlzyvacnfi/Build/Intermediates/helloworld.build/Debug-iphoneos/helloworld.build/Objects-normal/armv7s/AFOAuth1Client.o
/Users/Sa7bi/Dropbox/Aliens Wings/HelloWorld/OpenKitSDK/libOpenKit.a(AFOAuth1Client.o)
duplicate symbol _OBJC_IVAR_$_AFOAuth1Client._key in:
/Users/Sa7bi/Library/Developer/Xcode/DerivedData/helloworld-erlcedkitaorqobgauzlzyvacnfi/Build/Intermediates/helloworld.build/Debug-iphoneos/helloworld.build/Objects-normal/armv7s/AFOAuth1Client.o
/Users/Sa7bi/Dropbox/Aliens Wings/HelloWorld/OpenKitSDK/libOpenKit.a(AFOAuth1Client.o)
duplicate symbol _OBJC_IVAR_$_AFOAuth1Client._secret in:
/Users/Sa7bi/Library/Developer/Xcode/DerivedData/helloworld-erlcedkitaorqobgauzlzyvacnfi/Build/Intermediates/helloworld.build/Debug-iphoneos/helloworld.build/Objects-normal/armv7s/AFOAuth1Client.o
/Users/Sa7bi/Dropbox/Aliens Wings/HelloWorld/OpenKitSDK/libOpenKit.a(AFOAuth1Client.o)
duplicate symbol _OBJC_IVAR_$_AFOAuth1Client._signatureMethod in:
/Users/Sa7bi/Library/Developer/Xcode/DerivedData/helloworld-erlcedkitaorqobgauzlzyvacnfi/Build/Intermediates/helloworld.build/Debug-iphoneos/helloworld.build/Objects-normal/armv7s/AFOAuth1Client.o
/Users/Sa7bi/Dropbox/Aliens Wings/HelloWorld/OpenKitSDK/libOpenKit.a(AFOAuth1Client.o)
duplicate symbol _OBJC_IVAR_$_AFOAuth1Client._realm in:
/Users/Sa7bi/Library/Developer/Xcode/DerivedData/helloworld-erlcedkitaorqobgauzlzyvacnfi/Build/Intermediates/helloworld.build/Debug-iphoneos/helloworld.build/Objects-normal/armv7s/AFOAuth1Client.o
/Users/Sa7bi/Dropbox/Aliens Wings/HelloWorld/OpenKitSDK/libOpenKit.a(AFOAuth1Client.o)
....
ld: 19 duplicate symbols for architecture armv7s
While searching on this website, some users suggested the following:
Compilation of the same file more than once ==> checked my [Build Phases | Compile Sources] nothing
Importing ".m" files instead of ".h" ==> checked all my imports, nothing
I really have no idea what is causing this.
Update: I have forget to mention that Google Ads SDK is included in my projet. When I delete the "-ObjC" linker flag, OpenKit works fine but Google doesn't.
After many weeks of search, I've found a solution. Instead of using the "-ObjC" linker flag for Google Ads, "force_load" was the perfect solution.
The "-ObjC" flag was messing with the OpenKit lib, according to the folks #OpenKit:
The problem is that the -ObjC flag loads all categories, and we removed some categories from the OpenKit SDK to make it work without using that flag.
force_load :load only that framework without messing with anything else.[source]
Related
I've been working on this error for the last few days and am really stuck. I keep getting a linker command error and can't get past it. I've searched the web and tried all of the tips: Checked for duplicate files, reinstalled pods, set active architecture to NO, deleted derived data, cleaned lots of times.
Here's the output I'm given:
duplicate symbol _OBJC_IVAR_$_SessionPlayer._nextEvent in:
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayer.o
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayerViewController.o
duplicate symbol _OBJC_IVAR_$_SessionPlayer._visitors in:
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayer.o
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayerViewController.o
duplicate symbol _OBJC_IVAR_$_SessionPlayer._currentSessionTimeInMilliseconds in:
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayer.o
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayerViewController.o
duplicate symbol _OBJC_IVAR_$_SessionPlayer._systemTimeInMilliseconds in:
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayer.o
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayerViewController.o
duplicate symbol _OBJC_CLASS_$_SessionPlayer in:
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayer.o
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayerViewController.o
duplicate symbol _OBJC_METACLASS_$_SessionPlayer in:
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayer.o
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayerViewController.o
duplicate symbol _OBJC_IVAR_$_SessionPlayer._isPlaying in:
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayer.o
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayerViewController.o
duplicate symbol _OBJC_IVAR_$_SessionPlayer._useTiming in:
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayer.o
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayerViewController.o
duplicate symbol _OBJC_IVAR_$_SessionPlayer._delegate in:
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayer.o
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayerViewController.o
duplicate symbol _OBJC_IVAR_$_SessionPlayer._timeline in:
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayer.o
/Users/user1/Library/Developer/Xcode/DerivedData/***-APP-NAME-bahimtombyapwkcekphmmbaifpqx/Build/Intermediates/***-APP-NAME.build/Debug-iphonesimulator/***-APP-NAME.build/Objects-normal/x86_64/SessionPlayerViewController.o
ld: 10 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Really not sure what to do, it's very frustrating.
EDIT: Made the discovery that all of my files are being compiled twice, which may be where the problem lies.
It sounds like you've included the source for SessionPlayer.m twice in your target's build. Based on some comments, it's likely because you have references to the file implicitly through a pod (which is what you want), and explicitly via a direct reference/inclusion (which you don't want; that's what the pods are for). Try doing the following (and I'll try to be as clear as I can in text, but if you have any questions I can include screenshots):
In the project navigator pane, select your project.
In the project editor window, select your app target (make sure it's not something like a UnitTest/LogicTest target).
Along the top of the project editor window, select "Build Phases"
In the main project editor window, there should now be a list of expandable sections, one of which is "Compile Source (xxx items)", where xxx is the number of source files used to build your target. Expand that section.
In the search/filter text field (upper right hand corner of project editor, placeholder text says "Filter"), enter "SessionPlayer"
I suspect that you've included SessionPlayer.m explicitly here, so you should see at least one instance in the list. Delete it by selecting the "-" button that appears at the bottom of the list.
Try rebuilding and see if at least the linker errors related to SessionPlayer.m disappear. If so, repeat the previous steps for any other such files.
Hope this helps.
duplicate symbol _OBJC_CLASS_$_Reachability in:
XYZMobileApp/Build/Intermediates/XYZMobileApp.build/Debug-iphonesimulator/XYZMobileApp.build/Objects-normal/x86_64/Reachability.o
XYZMobileApp/BusinessLogic/Library/XtifyLib/XtifyPush.embeddedframework/XtifyPush.framework/XtifyPush(Reachability.o)
I am getting this error:
duplicate symbol _OBJC_CLASS_$_Reachability in:
and
clang: error: linker command failed with exit code 1 (use -v to see invocation)
you have used Reachablity class two times in your code.
One is included in the framework XtifyPush.framework and other you have included in the bundle.
Remove the one you are adding to remove the duplicacy.
Make sure that you did not include the Reachability.m -> implementation file instead of Reachability.h-> header file.
And also make sure you didn't include Reachability in you your unit test target this can also cause issues.
I renamed Reachability class as well as filename in library to "MyReachability". Xcode asked me to unlock the file as it was under pod. I unlocked it and after building i got few errors in my framework that Reachability class not found. I renamed the class references there as well to MyReachability and it worked fine. Hope this helps.
I've been reading up on various linker errors on Stack Overflow for awhile now, and each seem to be a bit different. I'm hoping you might have insight into the one I'm getting.
I've got the following... (issue only exists in simulator. It's fine on device.)
Apple Mach-O Linker Error
ld: 192 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
There are 2 errors for every file...
duplicate symbol _CATEGORIES in:
/Users/me/Library/Developer/Xcode/DerivedData/Roto_Forum-ahulcvyneocizdcbjsdtiqgknlhk/Build/Intermediates/Roto Forum.build/Debug-iphonesimulator/Roto Forum.build/Objects-normal/x86_64/FFFMainBodyViewController.o
/Users/me/Library/Developer/Xcode/DerivedData/Roto_Forum-ahulcvyneocizdcbjsdtiqgknlhk/Build/Intermediates/Roto Forum.build/Debug-iphonesimulator/Roto Forum.build/Objects-normal/x86_64/Item.o
duplicate symbol _POINTS in:
/Users/me/Library/Developer/Xcode/DerivedData/Roto_Forum-ahulcvyneocizdcbjsdtiqgknlhk/Build/Intermediates/Roto Forum.build/Debug-iphonesimulator/Roto Forum.build/Objects-normal/x86_64/FFFMainBodyViewController.o
/Users/me/Library/Developer/Xcode/DerivedData/Roto_Forum-ahulcvyneocizdcbjsdtiqgknlhk/Build/Intermediates/Roto Forum.build/Debug-iphonesimulator/Roto Forum.build/Objects-normal/x86_64/Item.o
That's 2 of the 192 errors. If I look at my Compile Sources under the Build Phases of my Target, FFFMainBodyViewController.m is the first file. Item.m is the second. And for each and every file down the list, in order, I get a 2 duplicate errors like the ones seen above.
This all started I believe when I renamed my project, and therefore the target name in my Podfile also changed.
I've tried various things. Deleting Derived Data, Cleans, deleting the red libPods.a file from my framework, etc.
How might I solve this issue?
I'm trying to solve this linker error issue but I have no doubt, looked up for class duplicates or something else but nothing clear for now.
Did anyone faced this issue?
Seen this post on cocos2d forum but commenting out the macros didn't helped me...
duplicate symbol _OBJC_METACLASS_$_CCVideoPlayerImpl in:
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayer-9962022C0BCB5653.o
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayer-A41A32B34B96CC5E.o
duplicate symbol _OBJC_CLASS_$_CCVideoPlayerImpl in:
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayer-9962022C0BCB5653.o
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayer-A41A32B34B96CC5E.o
duplicate symbol _OBJC_CLASS_$_CCVideoPlayer in:
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayer-9962022C0BCB5653.o
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayer-A41A32B34B96CC5E.o
duplicate symbol _OBJC_METACLASS_$_CCVideoPlayer in:
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayer-9962022C0BCB5653.o
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayer-A41A32B34B96CC5E.o
duplicate symbol _OBJC_IVAR_$_CCVideoPlayerImpliOS._theMovie in:
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayerImpliOS-2E61FAAA0338656.o
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayerImpliOS-D9E5031DFFEFC61.o
duplicate symbol _OBJC_IVAR_$_CCVideoPlayerImpliOS._videoOverlayView in:
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayerImpliOS-2E61FAAA0338656.o
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayerImpliOS-D9E5031DFFEFC61.o
duplicate symbol _OBJC_IVAR_$_CCVideoPlayerImpliOS._delegate in:
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayerImpliOS-2E61FAAA0338656.o
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayerImpliOS-D9E5031DFFEFC61.o
duplicate symbol _OBJC_IVAR_$_CCVideoPlayerImpliOS._playing in:
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayerImpliOS-2E61FAAA0338656.o
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayerImpliOS-D9E5031DFFEFC61.o
duplicate symbol _OBJC_IVAR_$_CCVideoPlayerImpliOS.noSkip in:
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayerImpliOS-2E61FAAA0338656.o
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayerImpliOS-D9E5031DFFEFC61.o
duplicate symbol _OBJC_CLASS_$_CCVideoPlayerImpliOS in:
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayerImpliOS-2E61FAAA0338656.o
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayerImpliOS-D9E5031DFFEFC61.o
duplicate symbol _OBJC_METACLASS_$_CCVideoPlayerImpliOS in:
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayerImpliOS-2E61FAAA0338656.o
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/CCVideoPlayerImpliOS-D9E5031DFFEFC61.o
duplicate symbol _OBJC_IVAR_$_VideoOverlayView._touch in:
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/videoOverlayView-3F7278265D6C165F.o
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/videoOverlayView-24E20B177AADBD4D.o
duplicate symbol _OBJC_CLASS_$_VideoOverlayView in:
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/videoOverlayView-3F7278265D6C165F.o
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/videoOverlayView-24E20B177AADBD4D.o
duplicate symbol _OBJC_METACLASS_$_VideoOverlayView in:
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/videoOverlayView-3F7278265D6C165F.o
/Users/username/Library/Developer/Xcode/DerivedData/ProjectName-cejlpqfnlpectralthclvyvltqkk/Build/Intermediates/ProjectName.build/Debug-iphoneos/ProjectName.build/Objects-normal/armv7/videoOverlayView-24E20B177AADBD4D.o
ld: 22 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It seems you are imported CCVideoPlayer two times in your Xcode project. Check your project resources, if it is there remove one.
I'm currently learning how to use Objective-C
And I was doing a simple project involving classes
I decided to plop it into Xcode for some easy visual debugging
but upon ironing out all the errors and warnings I ran into that:
duplicate symbol _OBJC_IVAR_$_Customer._fName in:
/Users/Slench/Library/Developer/Xcode/DerivedData/NameRankIntention-hlaqvlslfjimqdeysxqiyloirdus/Build/Intermediates/NameRankIntention.build/Debug/NameRankIntention.build/Objects-normal/x86_64/main.o
/Users/Slench/Library/Developer/Xcode/DerivedData/NameRankIntention-hlaqvlslfjimqdeysxqiyloirdus/Build/Intermediates/NameRankIntention.build/Debug/NameRankIntention.build/Objects-normal/x86_64/NRaI.o
duplicate symbol _OBJC_IVAR_$_Customer._lName in:
/Users/Slench/Library/Developer/Xcode/DerivedData/NameRankIntention-hlaqvlslfjimqdeysxqiyloirdus/Build/Intermediates/NameRankIntention.build/Debug/NameRankIntention.build/Objects-normal/x86_64/main.o
/Users/Slench/Library/Developer/Xcode/DerivedData/NameRankIntention-hlaqvlslfjimqdeysxqiyloirdus/Build/Intermediates/NameRankIntention.build/Debug/NameRankIntention.build/Objects-normal/x86_64/NRaI.o
duplicate symbol _OBJC_IVAR_$_Customer._age in:
/Users/Slench/Library/Developer/Xcode/DerivedData/NameRankIntention-hlaqvlslfjimqdeysxqiyloirdus/Build/Intermediates/NameRankIntention.build/Debug/NameRankIntention.build/Objects-normal/x86_64/main.o
/Users/Slench/Library/Developer/Xcode/DerivedData/NameRankIntention-hlaqvlslfjimqdeysxqiyloirdus/Build/Intermediates/NameRankIntention.build/Debug/NameRankIntention.build/Objects-normal/x86_64/NRaI.o
duplicate symbol _OBJC_IVAR_$_Customer._rank in:
/Users/Slench/Library/Developer/Xcode/DerivedData/NameRankIntention-hlaqvlslfjimqdeysxqiyloirdus/Build/Intermediates/NameRankIntention.build/Debug/NameRankIntention.build/Objects-normal/x86_64/main.o
/Users/Slench/Library/Developer/Xcode/DerivedData/NameRankIntention-hlaqvlslfjimqdeysxqiyloirdus/Build/Intermediates/NameRankIntention.build/Debug/NameRankIntention.build/Objects-normal/x86_64/NRaI.o
duplicate symbol _OBJC_IVAR_$_Customer._intention in:
/Users/Slench/Library/Developer/Xcode/DerivedData/NameRankIntention-hlaqvlslfjimqdeysxqiyloirdus/Build/Intermediates/NameRankIntention.build/Debug/NameRankIntention.build/Objects-normal/x86_64/main.o
/Users/Slench/Library/Developer/Xcode/DerivedData/NameRankIntention-hlaqvlslfjimqdeysxqiyloirdus/Build/Intermediates/NameRankIntention.build/Debug/NameRankIntention.build/Objects-normal/x86_64/NRaI.o
duplicate symbol _OBJC_METACLASS_$_Customer in:
/Users/Slench/Library/Developer/Xcode/DerivedData/NameRankIntention-hlaqvlslfjimqdeysxqiyloirdus/Build/Intermediates/NameRankIntention.build/Debug/NameRankIntention.build/Objects-normal/x86_64/main.o
/Users/Slench/Library/Developer/Xcode/DerivedData/NameRankIntention-hlaqvlslfjimqdeysxqiyloirdus/Build/Intermediates/NameRankIntention.build/Debug/NameRankIntention.build/Objects-normal/x86_64/NRaI.o
duplicate symbol _OBJC_CLASS_$_Customer in:
/Users/Slench/Library/Developer/Xcode/DerivedData/NameRankIntention-hlaqvlslfjimqdeysxqiyloirdus/Build/Intermediates/NameRankIntention.build/Debug/NameRankIntention.build/Objects-normal/x86_64/main.o
/Users/Slench/Library/Developer/Xcode/DerivedData/NameRankIntention-hlaqvlslfjimqdeysxqiyloirdus/Build/Intermediates/NameRankIntention.build/Debug/NameRankIntention.build/Objects-normal/x86_64/NRaI.o
ld: 7 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Now the weird thing is that I then put the "fixed code" back into Sublime Text, where I saved it and then compiled it through the terminal where it worked just fine no errors no warnings nothing
I've read through some of the other questions regarding this and the solution has either always been that they have found the duplicate declaration, or that they had an extra file by the same name that resulted in duplicate declarations...
I have neither...
so... any help?
Are you possibly importing the 'NRaI.m' file in main.m by accident?