cocos2d-c++ 添加iOS广告sdk遇到的问题(inmobile)

来源:互联网 发布:java集合常用的方法 编辑:程序博客网 时间:2024/06/04 19:59


个人经验文档:http://blog.csdn.net/Henry_moneyBag/article/details/50962530

官方文档:https://www.inmobi.com/portal/#support/listing/pType=1;pid=1475943661272;platform=IOS;siteId=8983bf74c23a444bac432c3ab62bec1b

ios系统中cocos2dx中如何添加广告:http://blog.csdn.net/kkk0526/article/details/10235551

http://www.tuicool.com/articles/vyMVVj

遇到的一些问题

1.Other Linker Flags 设置成 -ObjC 真机编译报错

Undefined symbols for architecture armv7s:
  "_GCControllerDidDisconnectNotification", referenced from:
      -[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2dx iOS.a(CCController-iOS.o)
  "_GCControllerDidConnectNotification", referenced from:
      -[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2dx iOS.a(CCController-iOS.o)
  "_OBJC_CLASS_$_GCController", referenced from:
      objc-class-ref in libcocos2dx iOS.a(CCController-iOS.o)
     (maybe you meant: _OBJC_CLASS_$_GCControllerConnectionEventHandler)
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

解决办法:增加两个库:
MediaPlayer.framework
GameController.framework 

2.Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_WKUserContentController", referenced from:
      objc-class-ref in InMobiSDK(libIMCommons.a-arm64-master.o)
  "_OBJC_CLASS_$_WKPreferences", referenced from:
      objc-class-ref in InMobiSDK(libIMCommons.a-arm64-master.o)
  "_OBJC_CLASS_$_WKWebViewConfiguration", referenced from:
      objc-class-ref in InMobiSDK(libIMCommons.a-arm64-master.o)
  "_OBJC_CLASS_$_WKWebView", referenced from:
      objc-class-ref in InMobiSDK(libIMCommons.a-arm64-master.o)
      objc-class-ref in InMobiSDK(INMMoatBootstrap.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

解决办法:增加库WebKit.framework

3."stack"file not found

http://blog.csdn.net/michaelin1208/article/details/51593844

将文件后缀改为.mm(解决cpp语言混编问题)



0 0