0

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?

Rajesh
  • 546
  • 9
  • 29
  • There might be duplicate files of SMCalloutView in your project, select your project and see it in finder and check if there are already SMCallout duplicate files or not. You might have dragged it two times. – Rahul Patel Dec 22 '15 at 07:53

1 Answers1

0

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.

enter image description here

Reedy
  • 1,866
  • 2
  • 20
  • 23