I am setting up react-native app. I use react-native-vision-camera and vision-camera-code-scanner for QR scanning. However, I want to also add a custom frame processor for react-native-vision-camera. When I tried to add pod TensorFlowLiteTaskVision like described here, I got the "duplicate symbols for architecture x86_64" error.
duplicate symbol '_OBJC_IVAR_$_GMLImage._height' in:
./ios/Pods/MLImage/Frameworks/MLImage.framework/MLImage(GMLImage.o)
./ios/Pods/TensorFlowLiteTaskVision/Frameworks/TensorFlowLiteTaskVision.framework/TensorFlowLiteTaskVision(GMLImage.o)
duplicate symbol '_OBJC_IVAR_$_GMLImage._pixelBuffer' in:
./ios/Pods/MLImage/Frameworks/MLImage.framework/MLImage(GMLImage.o)
./ios/Pods/TensorFlowLiteTaskVision/Frameworks/TensorFlowLiteTaskVision.framework/TensorFlowLiteTaskVision(GMLImage.o)
duplicate symbol '_OBJC_IVAR_$_GMLImage._sampleBuffer' in:
./ios/Pods/MLImage/Frameworks/MLImage.framework/MLImage(GMLImage.o)
./ios/Pods/TensorFlowLiteTaskVision/Frameworks/TensorFlowLiteTaskVision.framework/TensorFlowLiteTaskVision(GMLImage.o)
duplicate symbol '_OBJC_IVAR_$_GMLImage._orientation' in:
./ios/Pods/MLImage/Frameworks/MLImage.framework/MLImage(GMLImage.o)
./ios/Pods/TensorFlowLiteTaskVision/Frameworks/TensorFlowLiteTaskVision.framework/TensorFlowLiteTaskVision(GMLImage.o)
duplicate symbol '_OBJC_IVAR_$_GMLImage._width' in:
./ios/Pods/MLImage/Frameworks/MLImage.framework/MLImage(GMLImage.o)
./ios/Pods/TensorFlowLiteTaskVision/Frameworks/TensorFlowLiteTaskVision.framework/TensorFlowLiteTaskVision(GMLImage.o)
duplicate symbol '_OBJC_IVAR_$_GMLImage._imageSourceType' in:
./ios/Pods/MLImage/Frameworks/MLImage.framework/MLImage(GMLImage.o)
./ios/Pods/TensorFlowLiteTaskVision/Frameworks/TensorFlowLiteTaskVision.framework/TensorFlowLiteTaskVision(GMLImage.o)
duplicate symbol '_OBJC_IVAR_$_GMLImage._image' in:
./ios/Pods/MLImage/Frameworks/MLImage.framework/MLImage(GMLImage.o)
./ios/Pods/TensorFlowLiteTaskVision/Frameworks/TensorFlowLiteTaskVision.framework/TensorFlowLiteTaskVision(GMLImage.o)
duplicate symbol '_OBJC_CLASS_$_GMLImage' in:
./ios/Pods/MLImage/Frameworks/MLImage.framework/MLImage(GMLImage.o)
./ios/Pods/TensorFlowLiteTaskVision/Frameworks/TensorFlowLiteTaskVision.framework/TensorFlowLiteTaskVision(GMLImage.o)
duplicate symbol '_OBJC_METACLASS_$_GMLImage' in:
./ios/Pods/MLImage/Frameworks/MLImage.framework/MLImage(GMLImage.o)
./ios/Pods/TensorFlowLiteTaskVision/Frameworks/TensorFlowLiteTaskVision.framework/TensorFlowLiteTaskVision(GMLImage.o)
Looks like, both MLImage (which is dependency pod for vision-camera-code-scanner through "GoogleMLKit/BarcodeScanning") and TensorFlowLiteTaskVision have the same symbol GMLImage. I checked source files and GMLImage header file is really the same in both pods.
Any ideas how to solve/avoid this?
I tried removing one pod and then another. If there is only one of the pods present, works like it should.
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.
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]
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 am using restkit inside my project i tried to setup the configuration of the parser
by :
[[RKParserRegistry sharedRegistry] setParserClass:[RKJSONParserJSONKit class] forMIMEType:#"text/javascript"];
I imported the library of the parser as in restkit documentation
#import <RestKit/JSONKit.h>
but always the error
Use of undeclared identifier 'RKJSONParserJSONKit'
also i tried to fix it by importing the header from its location by :
#import <RestKit/Code/Support/Parsers/JSON/RKJSONParserJSONKit.h>
it does not work , but when i tried to copy the required files for the parser and add it to my project as files the liker give me:
duplicate symbol _OBJC_METACLASS_$_RKJSONParserJSONKit in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/RKJSONParserJSONKit.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(RKJSONParserJSONKit.o)
duplicate symbol _OBJC_CLASS_$_RKJSONParserJSONKit in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/RKJSONParserJSONKit.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(RKJSONParserJSONKit.o)
duplicate symbol _RKLogInitialize in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/RKLog.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(RKLog.o)
duplicate symbol _RKLogConfigureFromEnvironment in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/RKLog.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(RKLog.o)
duplicate symbol _RKLogLevelForString in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/RKLog.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(RKLog.o)
duplicate symbol _RKLogValidationError in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/RKLog.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(RKLog.o)
duplicate symbol _RKLogIntegerAsBinary in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/RKLog.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(RKLog.o)
duplicate symbol _lcl_configure_by_component in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/lcl.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(lcl.o)
duplicate symbol _lcl_configure_by_identifier in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/lcl.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(lcl.o)
duplicate symbol __lcl_component_identifier in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/lcl.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(lcl.o)
duplicate symbol _lcl_configure_by_header in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/lcl.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(lcl.o)
duplicate symbol __lcl_component_header in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/lcl.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(lcl.o)
duplicate symbol _lcl_configure_by_name in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/lcl.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(lcl.o)
duplicate symbol __lcl_component_name in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/lcl.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(lcl.o)
duplicate symbol __lcl_level_header in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/lcl.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(lcl.o)
duplicate symbol __lcl_level_header_1 in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/lcl.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(lcl.o)
duplicate symbol __lcl_level_header_3 in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/lcl.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(lcl.o)
duplicate symbol __lcl_level_name in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/lcl.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(lcl.o)
duplicate symbol __lcl_version in:
/Users/reserveout/Desktop/ReserveOutApplication/Build/Intermediates/ReserveOutApplication.build/Debug-iphonesimulator/ReserveOutApplication.build/Objects-normal/i386/lcl.o
/Users/reserveout/Desktop/ReserveOutApplication/Build/Products/Debug-iphonesimulator/libRestKit.a(lcl.o)
ld: 19 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
RestKit is configured by default to use JSONKit
Your import is wrong, this doesn't import what you want.
try this one but this is Wile E. Coyote's solution
#import "RestKit/Code/Support/Parsers/JSON/RKJSONParserJSONKit.h"
3. If you really want to copy resources, copy only header file, not source (.m)
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?