博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
AdMob接入踩坑记
阅读量:2396 次
发布时间:2019-05-10

本文共 3824 字,大约阅读时间需要 12 分钟。

转载自: http://blog.csdn.net/d744784681/article/details/60574700

首先列出参考文档:

我是cocos2d-x v3.9的工程,在按照官方文档接入之后,出现一堆编译错误例如:

[plain]   
  1. Undefined symbols for architecture arm64:  
  2.   "_OBJC_CLASS_$_GLKView", referenced from:  
  3.       objc-class-ref in GoogleMobileAds(flat-arm64)  
  4.   "_CVOpenGLESTextureCacheCreateTextureFromImage", referenced from:  
  5.       l2673 in GoogleMobileAds(flat-arm64)  
  6.   "_CVOpenGLESTextureGetName", referenced from:  
  7.       l2673 in GoogleMobileAds(flat-arm64)  
  8.   "_kUTTagClassMIMEType", referenced from:  
  9.       l2987 in GoogleMobileAds(flat-arm64)  
  10.   "_CVOpenGLESTextureCacheCreate", referenced from:  
  11.       l2672 in GoogleMobileAds(flat-arm64)  
  12.   "_CVPixelBufferGetHeight", referenced from:  
  13.       l2670 in GoogleMobileAds(flat-arm64)  
  14.   "_CVOpenGLESTextureCacheFlush", referenced from:  
  15.       l2671 in GoogleMobileAds(flat-arm64)  
  16.   "_CVBufferGetAttachment", referenced from:  
  17.       l2670 in GoogleMobileAds(flat-arm64)  
  18.   "_UTTypeCreatePreferredIdentifierForTag", referenced from:  
  19.       l2987 in GoogleMobileAds(flat-arm64)  
  20.   "_CVPixelBufferGetWidth", referenced from:  
  21.       l2670 in GoogleMobileAds(flat-arm64)  
  22.   "_kCVImageBufferYCbCrMatrixKey", referenced from:  
  23.       l2670 in GoogleMobileAds(flat-arm64)  
  24.   "_CVOpenGLESTextureGetTarget", referenced from:  
  25.       l2673 in GoogleMobileAds(flat-arm64)  
  26.   "_kCVPixelBufferPixelFormatTypeKey", referenced from:  
  27.       l090 in GoogleMobileAds(flat-arm64)  
  28.   "_kCVImageBufferYCbCrMatrix_ITU_R_601_4", referenced from:  
  29.       l2670 in GoogleMobileAds(flat-arm64)  
  30.   "_GLKMatrix4Identity", referenced from:  
  31.       l2664 in GoogleMobileAds(flat-arm64)  
  32.       l2675 in GoogleMobileAds(flat-arm64)  
  33. ld: symbol(s) not found for architecture arm64  
  34. clang: error: linker command failed with exit code 1 (use -v to see invocation)  

请参见这篇文章的对照表,加入相应的系统框架:

framework名 缺少框架会报的错
GLKit.framework _OBJC_CLASS_$_GLKView
_GLKMatrix4Identity
MobileCoreServices.framework _kUTTagClassMIMEType
_UTTypeCreatePreferredIdentifierForTag
CoreVideo.framework _CVOpenGLESTextureCacheCreateTextureFromImage
_CVOpenGLESTextureGetName
_CVOpenGLESTextureCacheCreate
_CVOpenGLESTextureCacheFlush
_CVPixelBufferGetWidth
_CVOpenGLESTextureGetTarget
_kCVPixelBufferPixelFormatTypeKey
_kCVImageBufferYCbCrMatrix_ITU_R_601_4
_CVPixelBufferGetHeight
_CVBufferGetAttachment
_kCVImageBufferYCbCrMatrixKey
StoreKit.framework _OBJC_CLASS_$_SKProductsRequest
_OBJC_CLASS_$_SKMutablePayment
_OBJC_CLASS_$_SKPaymentQueue
_OBJC_CLASS_$_SKStoreProductViewController
_SKStoreProductParameterITunesItemIdentifier
MediaPlayer.framework _MPMoviePlayerPlaybackDidFinishNotification
_MPMoviePlayerPlaybackStateDidChangeNotification
_OBJC_CLASS_$_MPMoviePlayerController
_OBJC_CLASS_$_MPVolumeView
SafariServices.framework _OBJC_CLASS_$_SFSafariViewController
AdSupport.framework _OBJC_CLASS_$_ASIdentifierManager
CoreMotion.framework _OBJC_CLASS_$_CMMotionManager
CoreTelephony.framework _CTRadioAccessTechnologyDidChangeNotification
_OBJC_CLASS_$_CTTelephonyNetworkInfo
MessageUI.framework _OBJC_CLASS_$_MFMailComposeViewController
_OBJC_CLASS_$_MFMessageComposeViewController
CoreText.framework _CTFramesetterCreateWithAttributedString
_CTFramesetterSuggestFrameSizeWithConstraints
GameKit.framework _OBJC_CLASS_$_GKAchievement
_OBJC_CLASS_$_GKScore
_OBJC_CLASS_$_GKGameCenterViewController
_OBJC_CLASS_$_GKLocalPlayer
SystemConfiguration.framework _SCNetworkReachabilityCreateWithAddress
_SCNetworkReachabilityGetFlags
_SCNetworkReachabilityCreateWithName
_SCNetworkReachabilitySetDispatchQueue
_SCNetworkReachabilitySetCallback
Security.framework _SecCertificateCreateWithData
_SecTrustCopyExceptions
_SecTrustEvaluate
_SecTrustSetAnchorCertificates
_SecTrustSetExceptions
CoreMedia.framework _CMTimeGetSeconds
_CMTimeMakeWithSeconds
_CMTimeMake
_kCMTimeZero
OpenGLES.framework _OBJC_CLASS_$_EAGLContext
_glActiveTexture
 
CFNetwork.framework _CFHostCreateWithName
_CFHostStartInfoResolution
_CFHostGetAddressing
一般国外的sdk文档都一个尿性,文档及其简单。

在接入admob插屏广告的时候,我就遇到上面的一类问题,然后就OK了

你可能感兴趣的文章
Camera 图像处理原理分析- 色彩篇 二
查看>>
Camera 图像处理原理分析- 色彩篇 三
查看>>
Camera 图像处理原理分析- 亮度及曝光控制
查看>>
Camera 图像处理原理分析- 抗噪 变焦 频闪 等
查看>>
c语言核心技术 二
查看>>
udev文件系统的使用和基本工作原理分析
查看>>
快速理解Docker - 容器级虚拟化解决方案
查看>>
Memcached 及 Redis 架构分析和比较
查看>>
Android Kernel Porting 的简单总结文档
查看>>
Tachyon架构分析和现存问题讨论
查看>>
spark internal - 作业调度
查看>>
ARM平台上蓝牙协议栈Bluez的移植使用和配置
查看>>
理解和使用Alsa的配置文件
查看>>
理解和使用Linux的硬件抽象层HAL
查看>>
用KFI和Graphviz跟踪/优化内核代码
查看>>
设置SourceInsight的condition解决代码语法解析错误的问题
查看>>
阿里软件SAAS分析笔记(转)
查看>>
SaaS大会 八百客引领SaaS新理念(转)
查看>>
saas简介(转)
查看>>
Salesforce将成为按需世界的微软吗?(转)
查看>>