Reputation: 556
Im using mapbox and I need to customise annotation for it. For that I found that we can use SMCalloutView.
But when I integrated SMCalloutView into xcode project, then it started giving linking duplicate symbol errors.
/Users/xxx/Library/Developer/Xcode/DerivedData/mapboxDemoWithCustomAnnotation-ebmsoyqrqzxuouckyxxwhjbcakwf/Build/Intermediates/mapboxDemoWithCustomAnnotation.build/Debug-iphonesimulator/mapboxDemoWithCustomAnnotation.build/Objects-normal/x86_64/SMCalloutView.o
/Users/xxx/Desktop/mapboxDemoWithCustomAnnotation/Pods/Mapbox-iOS-SDK/Mapbox.framework/Mapbox(SMCalloutView.o)
ld: 38 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can anyone help me on this?
Upvotes: 0
Views: 106
Reputation: 2076
The problem you have is that somewhere you are including the SMCalloutView file twice which is being compiled twice. Its a drawback for objective-c as you cannot have the same name of an object twice. I would first, check in your project if you have included the smcalloutview file in your project.
Start by looking your project(like mine, the Movei project) this should NOT include smcalloutview class. SMCalloutView should only exist in the Pods project.
Upvotes: 0