ld:添加第三方框架(AdMob)时,iOSDevice64上的体系结构arm64的134个重复符号

时间:2018-10-04 13:12:19

标签: ios delphi admob firemonkey google-admob

我下载了适用于iOS的Google移动广告SDK,并将其提取到iOS 11 SDK的框架路径中。然后,我使用SDK Transform Assistant为它生成了pascal标头。我将标头添加到一个空项目中,并添加了链接器选项-ObjC -lz -lsqlite3来修复“未定义符号”错误。我还不得不使用SDK Manager(依赖GoogleMobileAds)复制其他一些框架。

该项目在iOSDevice32上运行良好,但是在为iOSDevice64构建时,链接失败并显示错误

[DCC Error] E2597 duplicate symbol l002 in:
      C:\Users\Christopher Hahn\Documents\Embarcadero\Studio\SDKs\iPhoneOS11.0.sdk/System/Library/Frameworks/GoogleMobileAds.framework/GoogleMobileAds(GADGestureRecognizer.o)
        C:\Users\Christopher Hahn\Documents\Embarcadero\Studio\SDKs\iPhoneOS11.0.sdk/System/Library/Frameworks/GoogleMobileAds.framework/GoogleMobileAds(GADNVideoPlayer.o)
  duplicate symbol l002 in:
      C:\Users\Christopher Hahn\Documents\Embarcadero\Studio\SDKs\iPhoneOS11.0.sdk/System/Library/Frameworks/GoogleMobileAds.framework/GoogleMobileAds(GADGestureRecognizer.o)
        C:\Users\Christopher Hahn\Documents\Embarcadero\Studio\SDKs\iPhoneOS11.0.sdk/System/Library/Frameworks/GoogleMobileAds.framework/GoogleMobileAds(GADNGLSphericalShader.o)
  duplicate symbol l004 in:
      C:\Users\Christopher Hahn\Documents\Embarcadero\Studio\SDKs\iPhoneOS11.0.sdk/System/Library/Frameworks/GoogleMobileAds.framework/GoogleMobileAds(GADLocation.o)
        C:\Users\Christopher Hahn\Documents\Embarcadero\Studio\SDKs\iPhoneOS11.0.sdk/System/Library/Frameworks/GoogleMobileAds.framework/GoogleMobileAds(GADNGLSphericalShader.o)
  duplicate symbol l005 in:
      C:\Users\Christopher Hahn\Documents\Embarcadero\Studio\SDKs\iPhoneOS11.0.sdk/System/Library/Frameworks/GoogleMobileAds.framework/GoogleMobileAds(GADLocation.o)
        C:\Users\Christopher Hahn\Documents\Embarcadero\Studio\SDKs\iPhoneOS11.0.sdk/System/Library/Frameworks/GoogleMobileAds.framework/GoogleMobileAds(GADNGLSphericalShader.o)

我该如何解决?我在OSX 10.13.6上使用了Delphi 10.2.3和XCode 9(尽管我也在XCode 9.2和9.4.1以及相应的iOS版本中进行了尝试)

1 个答案:

答案 0 :(得分:0)

这意味着您具有定义了相同名称的多个类。当您使用两个具有相同源的库时,可能会发生这种情况。