GoogleMapsSDK:架构x86_64的未定义符号

STo*_*STo 20 linker-errors undefined-symbol ios google-maps-sdk-ios

我正在尝试安装Google maps SDK,并且在运行时遇到此错误:

Undefined symbols for architecture x86_64:
  "_CBAdvertisementDataManufacturerDataKey", referenced from:
      -[GMSx_PEBeaconScanner centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in GoogleMaps(PEBeaconScanner.o)
  "_CBAdvertisementDataServiceDataKey", referenced from:
      -[GMSx_PEBeaconScanner centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in GoogleMaps(PEBeaconScanner.o)
  "_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from:
      -[GMSx_PEBeaconScanner scanIfAppropriate] in GoogleMaps(PEBeaconScanner.o)
  "_OBJC_CLASS_$_CBCentralManager", referenced from:
      objc-class-ref in GoogleMaps(PEBeaconScanner.o)
  "_OBJC_CLASS_$_CBUUID", referenced from:
      objc-class-ref in GoogleMaps(PEBeacon.o)
      objc-class-ref in GoogleMaps(PEBeaconScanner.o)
  "_vImageBoxConvolve_Planar8", referenced from:
      (anonymous namespace)::CreateBlurredImage(CGImage*, double, double) in GoogleMaps(GLWaterGroup.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

小智 44

当我升级使用手动安装的旧版Google地图SDK的应用时,我注意到以下更改:

  • 需要在Build Phases - > Link Bundle with Libraries中链接到CoreBluetooth.frameworkAccelerate.framework.
  • "Other Linker Flags"下的-all_load标志将导致"重复符号"错误.(改用-ObjC.)

如果您使用CocoaPods安装方法(根据他们当前的说明),它应该采用所需的框架,但它仍然会被-all_load搞砸.


小智 11

确保包含以下内容

GoogleMaps SDK框架和捆绑包

GoogleMaps(扩展名为.framework)出现在您的根目录(.xcodeproj所在的位置)

您的xcode项目中引用了GoogleMaps(扩展名为.bundle)

以下框架

Accelerate.framework

AVFoundation.framework

CoreBluetooth.framework

CoreData.framework

CoreGraphics.framework

CoreLocation.framework

CoreText.framework

GLKit.framework

ImageIO.framework

的libc ++.dylib

libicucore.dylib

libz.dylib

OpenGLES.framework

QuartzCore.framework

Security.framework

SystemConfiguration.framework

构建设置

项目设置中的体系结构值包括armv7.

其他链接器标志有-ObjC,如果不存在则添加它


Aru*_*ITH 9

**_vImageBoxConvolve_Planar8, referenced from: (anonymous namespace)::CreateBlurredImage(CGImage*, double, double) in GoogleMaps(GLWaterGroup.o)**

This required "Accelerate.framework". So, please add it.

Steps:
1)Build Phases -> Link Bundle with Libraries.
2)Click "+",
3)Select "Accelerate.framework". Finish.

===================================

Others errors required "CoreBluetooth.framework. So, please add it also in similar way.
Run Code Online (Sandbox Code Playgroud)


Que*_*yot 5

看起来 Google 的 API 需要 CoreBluetooth 来进行 Beacon 定位。CoreBluetooth.framework在构建阶段链接,一切都应该没问题。

在此输入图像描述

编辑: 确保通过这些说明安装 GoogleMaps 以避免任何问题: https: //developers.google.com/maps/documentation/ios/start

  • 所以看起来 _vImageBoxConvolve_Planar8 在 Accelerate.framework 中可用。我将其添加到我的项目中,问题就消失了,现在它抱怨 GoogleMaps.framework 定义了 706 个重复符号:( (3认同)
  • 谢谢你昆汀。我刚刚这样做了,不幸的是,它发送了另一个错误:Undefined keywords for Architecture x86_64: "_vImageBoxConvolve_Planar8", referenced from: (anonymous namespace)::CreateBlurredImage(CGImage*, double, double) in GoogleMaps(GLWaterGroup.o) ld: symbol( s) 未找到架构 x86_64 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用) (2认同)