Google Maps 1.10.1 iOS with cocoapods giving duplicate symbol error

2k views Asked by At

I am trying to integrate the new GoogleMaps sdk 1.10.1 and I followed the quick start from https://developers.google.com/maps/documentation/ios/start

But I am getting the following error and i got stuck with duplicate symbol error.

GoogleMaps(ResourceContext.o)
duplicate symbol __ZN7gmscore8renderer14DepthMaskStateC1Eb in:
    /Users/klouddata/Documents/SVN_RIL/RTSS_iOS_B200/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(DepthMaskState.o)
duplicate symbol __ZN7gmscore8renderer14DepthMaskStateC2Eb in:
    /Users/klouddata/Documents/SVN_RIL/RTSS_iOS_B200/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(DepthMaskState.o)
duplicate symbol __ZN7gmscore8renderer14DepthMaskStateD0Ev in:
    /Users/klouddata/Documents/SVN_RIL/RTSS_iOS_B200/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(DepthMaskState.o)
duplicate symbol __ZN7gmscore8renderer14DepthMaskStateD1Ev in:
    /Users/klouddata/Documents/SVN_RIL/RTSS_iOS_B200/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(DepthMaskState.o)
duplicate symbol __ZN7gmscore8renderer14DepthMaskStateD2Ev in:
    /Users/klouddata/Documents/SVN_RIL/RTSS_iOS_B200/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(DepthMaskState.o)
duplicate symbol __ZNK7gmscore8renderer14DepthMaskState11StringValueEv in:
    /Users/klouddata/Documents/SVN_RIL/RTSS_iOS_B200/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(DepthMaskState.o)
duplicate symbol __ZNK7gmscore8renderer14DepthMaskState7PreDrawEPNS0_14EntityRendererERKNS_4base10reffed_ptrINS0_11EntityStateEEE in:
    /Users/klouddata/Documents/SVN_RIL/RTSS_iOS_B200/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(DepthMaskState.o)
duplicate symbol __ZNK7gmscore8renderer14DepthMaskState8PostDrawEPNS0_14EntityRendererERKNS_4base10reffed_ptrINS0_11EntityStateEEE in:
    /Users/klouddata/Documents/SVN_RIL/RTSS_iOS_B200/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(DepthMaskState.o)
duplicate symbol __ZTVN7gmscore8renderer14DepthMaskStateE in:
    /Users/klouddata/Documents/SVN_RIL/RTSS_iOS_B200/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(DepthMaskState.o)
duplicate symbol __ZN7gmscore8renderer15GLScopedContextC1EP15GMSIOSGLContext in:
    /Users/klouddata/Documents/SVN_RIL/RTSS_iOS_B200/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(GLScopedContext.o)
duplicate symbol __ZN7gmscore8renderer15GLScopedContextC2EP15GMSIOSGLContext in:
    /Users/klouddata/Documents/SVN_RIL/RTSS_iOS_B200/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(GLScopedContext.o)
duplicate symbol __ZN7gmscore8renderer15GLScopedContextD1Ev in:
    /Users/klouddata/Documents/SVN_RIL/RTSS_iOS_B200/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(GLScopedContext.o)
duplicate symbol __ZN7gmscore8renderer15GLScopedContextD2Ev in:
    /Users/klouddata/Documents/SVN_RIL/RTSS_iOS_B200/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(GLScopedContext.o)
ld: 706 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
5

There are 5 answers

0
dmi3j On

I've noticed same problem with Xcode 6.2. No problem at all with Xcode 6.3.2 Workaround would be to use

pod 'GoogleMaps', '1.9.2'

which working fine for me (with Xcode 6.2)

2
Tomáš Linhart On

I had the same problem and I have fixed it by removing -all_load from Other Linker Flags and I let CocoaPods to set my flags.

Check your project settings for this flag.

0
Dmitry On

Updating XCode to the latest version and using $(inherited) as Other Linker Flags option solved this problem for me.

0
andproff On

check your Other Linker Flags probably you have $(inherited) with other flag to GoogleMaps -framework "GoogleMaps". I recommend set just $(inherited)

0
Parth Kalavadia On

I had similar problem where there some other entries along with -ObjC in Other Linker Flags. Removing all other values except -ObjC solved my problem.