我按照this中的步骤进行操作,因为我在安装cocoapods时遇到问题,我手动下载了SDK zip,将其添加到项目中,编译得很好但是我收到了很多链接错误,如下所示。谢谢你的帮助。
Undefined symbols for architecture x86_64:
"_CBCentralManagerOptionShowPowerAlertKey", referenced from:
l942 in GoogleMobileAds(flat-x86_64) "_CVBufferGetAttachment", referenced from:
l2397 in GoogleMobileAds(flat-x86_64) "_CVOpenGLESTextureCacheCreate", referenced from:
l2399 in GoogleMobileAds(flat-x86_64) "_CVOpenGLESTextureCacheCreateTextureFromImage", referenced from:
l2400 in GoogleMobileAds(flat-x86_64) "_CVOpenGLESTextureCacheFlush", referenced from:
l2398 in GoogleMobileAds(flat-x86_64) "_CVOpenGLESTextureGetName", referenced from:
l2400 in GoogleMobileAds(flat-x86_64) "_CVOpenGLESTextureGetTarget", referenced from:
l2400 in GoogleMobileAds(flat-x86_64) "_CVPixelBufferGetHeight", referenced from:
l2397 in GoogleMobileAds(flat-x86_64) "_CVPixelBufferGetWidth", referenced from:
l2397 in GoogleMobileAds(flat-x86_64) "_GLKMatrix4Identity", referenced from:
l2392 in GoogleMobileAds(flat-x86_64)
l2402 in GoogleMobileAds(flat-x86_64) "_OBJC_CLASS_$_CBCentralManager", referenced from:
objc-class-ref in GoogleMobileAds(flat-x86_64) "_OBJC_CLASS_$_CBUUID", referenced from:
objc-class-ref in GoogleMobileAds(flat-x86_64) "_OBJC_CLASS_$_CMMotionManager", referenced from:
objc-class-ref in GoogleMobileAds(flat-x86_64) "_OBJC_CLASS_$_EAGLContext", referenced from:
objc-class-ref in GoogleMobileAds(flat-x86_64) "_OBJC_CLASS_$_GLKView", referenced from:
objc-class-ref in GoogleMobileAds(flat-x86_64) "_OBJC_CLASS_$_SFSafariViewController", referenced from:
objc-class-ref in GoogleMobileAds(flat-x86_64) "_glActiveTexture", referenced from:
l2397 in GoogleMobileAds(flat-x86_64) "_glAttachShader", referenced from:
_GADGLCreateProgram in GoogleMobileAds(flat-x86_64) "_glBindAttribLocation", referenced from:
l2399 in GoogleMobileAds(flat-x86_64) "_glBindTexture", referenced from:
l2400 in GoogleMobileAds(flat-x86_64) "_glClear", referenced from:
l092 in GoogleMobileAds(flat-x86_64) "_glClearColor", referenced from:
l092 in GoogleMobileAds(flat-x86_64) "_glCompileShader", referenced from:
l1011 in GoogleMobileAds(flat-x86_64) "_glCreateProgram", referenced from:
_GADGLCreateProgram in GoogleMobileAds(flat-x86_64) "_glCreateShader", referenced from:
_GADGLCreateProgram in GoogleMobileAds(flat-x86_64) "_glDeleteProgram", referenced from:
_GADGLCreateProgram in GoogleMobileAds(flat-x86_64)
l2401 in GoogleMobileAds(flat-x86_64) "_glDeleteShader", referenced from:
_GADGLCreateProgram in GoogleMobileAds(flat-x86_64) "_glDetachShader", referenced from:
_GADGLCreateProgram in GoogleMobileAds(flat-x86_64) "_glDisable", referenced from:
l2399 in GoogleMobileAds(flat-x86_64) "_glDrawArrays", referenced from:
l2397 in GoogleMobileAds(flat-x86_64) "_glEnableVertexAttribArray", referenced from:
l2397 in GoogleMobileAds(flat-x86_64) "_glGetProgramiv", referenced from:
_GADGLCreateProgram in GoogleMobileAds(flat-x86_64) "_glGetShaderiv", referenced from:
l1011 in GoogleMobileAds(flat-x86_64) "_glGetUniformLocation", referenced from:
l2399 in GoogleMobileAds(flat-x86_64) "_glLinkProgram", referenced from:
_GADGLCreateProgram in GoogleMobileAds(flat-x86_64) "_glShaderSource", referenced from:
l1011 in GoogleMobileAds(flat-x86_64) "_glTexParameterf", referenced from:
l2400 in GoogleMobileAds(flat-x86_64) "_glTexParameteri", referenced from:
l2400 in GoogleMobileAds(flat-x86_64) "_glUniform1f", referenced from:
l2397 in GoogleMobileAds(flat-x86_64) "_glUniform1i", referenced from:
l2399 in GoogleMobileAds(flat-x86_64) "_glUniformMatrix3fv", referenced from:
l2397 in GoogleMobileAds(flat-x86_64) "_glUniformMatrix4fv", referenced from:
l2397 in GoogleMobileAds(flat-x86_64) "_glUseProgram", referenced from:
l2399 in GoogleMobileAds(flat-x86_64) "_glVertexAttribPointer", referenced from:
l2397 in GoogleMobileAds(flat-x86_64) "_glViewport", referenced from:
l092 in GoogleMobileAds(flat-x86_64) "_kCVImageBufferYCbCrMatrixKey", referenced from:
l2397 in GoogleMobileAds(flat-x86_64) "_kCVImageBufferYCbCrMatrix_ITU_R_601_4", referenced from:
l2397 in GoogleMobileAds(flat-x86_64) "_kCVPixelBufferPixelFormatTypeKey", referenced from:
l086 in GoogleMobileAds(flat-x86_64) "_kEAGLColorFormatRGBA8", referenced from:
l070 in GoogleMobileAds(flat-x86_64) "_kEAGLDrawablePropertyColorFormat", referenced from:
l070 in GoogleMobileAds(flat-x86_64) "_kEAGLDrawablePropertyRetainedBacking", referenced from:
l070 in GoogleMobileAds(flat-x86_64) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code
1 (use -v to see invocation)
答案 0 :(得分:16)
我明白了。为项目添加了一些框架并且它有效,但在指南中没有提到。参考截图。
答案 1 :(得分:1)
GoogleMobileAds SDK(又名AdMob SDK)具有许多依赖关系,并且在连续版本中添加(有时会被删除)。例如,JavaScriptCore框架是从2016-10-17发布的版本7.13.0开始的新依赖项。如果再次遇到此问题,请在发行说明日志中检查框架依赖项的更新。
答案 2 :(得分:0)
安全性。还必须添加框架...
答案 3 :(得分:0)
MediaPlayer.framework也需要解决以下问题:
undefined "_OBJC_CLASS_$_MPVolumeView"