您的位置:首页 > 移动开发 > Cocos引擎

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

2016-10-28 16:22 585 查看
个人经验文档: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语言混编问题)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  cocos2d-x 广告 工作
相关文章推荐