Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps 1.10.1 iOS with cocoapods giving duplicate symbol error

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)
like image 740
user968597 Avatar asked Jun 10 '15 08:06

user968597


4 Answers

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

like image 54
andproff Avatar answered Oct 19 '22 17:10

andproff


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.

like image 29
Tomáš Linhart Avatar answered Oct 19 '22 19:10

Tomáš Linhart


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)

like image 2
dmi3j Avatar answered Oct 19 '22 19:10

dmi3j


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.

like image 1
Parth Kalavadia Avatar answered Oct 19 '22 18:10

Parth Kalavadia