开发腾讯移动游戏平台SDK ios版Ane扩展 总结
本文记录了在开发 腾讯移动游戏平台SDK(MSDK) ios版Ane扩展 过程中所遇到的问题
文中非常多问题都是基础的问题、对object c和xcode配置了解不深入导致的。(没办法,开发ane的程序猿大部分都是做ActionScript的,一般对c/c++都没有开发经验)
问题一、编译报错:Unexpected ‘@’ in program
代码例如以下:
@try{
}
@catch{
}
原因是高版本号xcode代码放在低版本号xcode下跑,低版本号ios 不支持这样的写法(ios 7.0编译正常),须要改动设置ios Deployment Target属性
假设要支持安装在低版本号的ios上,则不能用这样的写法----待确认??
问题二、c++代码和object-c混合编译,会报错:Cannot use '@try' with Objective-C exceptionsdisabled
解决的方法:改动target -> build settings -> All | Combined -> Apple LLVMCompiler 5.0 - Language - Objective C 中 EnableObjective-C Exceptions 为YES
问题三、编译报错 instance method '-AddList:' not found (returntype defaults to 'id')
原因1:没有import .h文件,仅仅通过 @class file 方式引用了文件,解决方法是 把文件import进来
例http://blog.csdn.net/liuyuyefz/article/details/8189210
原因2:实例方法和静态方法搞错了
问题四、项目移植到还有一个版本号ide后编译报错
Unsupported compiler 'com.apple.compilers.llvmgcc42' selected forarchitecture 'armv7'
Unableto determine concrete GCC compiler for file/Users/flash8/Desktop/app/TencentMSDKAneIOS/TencentMSDKAneIOS/TencentMSDKAneIOS.mof type sourcecode.c.objc.
原因是xcode版本号不同,编译器不一样了,解决方法:
设置 Build Settings-> Build Options -> Compiler for C/C++/Objective-C 选择DefaultComplier (Apple LLVM 5.1)
问题五、打包时报错:ld: framework not found AdSupport
原因是platformoptions.xml中未加入�在上加入�AdSupportframework,注意(低于IOS 6.0系统须要在xcode中设置为Optional)
<option>-frameworkAdSupport</option>
问题六、打包时报错:-[GDataXMLElement attributeForName]......一大段
原因是platformoptions.xml中未加入�在上加入�libxml2
<option>-lxml2</option>
问题七、打包时报错:
Undefined symbols for architecture armv7:
"_TencentMSDKAneIOSExtInitializer",referenced from:
_g_com_adobe_air_fre_fmap in extensionglue.o
(maybe you meant:_TencentMSDKAneIOSExtInitializer_name)
"_TencentMSDKAneIOSExtInitializer",referenced from:
_g_com_adobe_air_fre_fmap in extensionglue.o
(maybe you meant:_TencentMSDKAneIOSExtFinalizer_name)
ld:symbol(s) not found for architecture armv7
Compilationfailed while executing : ld64
找了好久,一直怀疑是类库漏了或配置错误,后来发现原因是 c++把函数名翻译了(这个项目包括c++代码)
解决的方法是在头文件里用extern c把那两入口函数包住
#if__cplusplus
extern"C" {
#endif
void *TencentMSDKAneIOSExtInitializer();
void *TencentMSDKAneIOSExtInitializer();
#if__cplusplus
} // Extern C
#endif
參考链接:http://stackoverflow.com/questions/7376003/linker-error-using-extern-c-in-objective-c-code
问题八、#import<vector> 编译时提示错误“vector.h file not found”
原因是项目中引入了C++ STL里的vector.h文件,编译器的配置不正确,改动例如以下配置就可以:
1. 选择project -> build setting -> apple LLVM compiler 3.0 – language配置项,
2. 将Compile Sources As设置项改动为Objective-C++。
【原文链接:http://blog.csdn.net/linguifa/article/details/25741807/
转载请注明出处】
开发腾讯移动游戏平台SDK ios版Ane扩展 总结的更多相关文章
- 开发腾讯移动游戏平台SDK Android版Ane扩展 总结
本文记录了在开发 腾讯移动游戏平台SDK(MSDK) Android版Ane扩展 过程中所遇到的问题和相关解决方式 问题一:编译报错:Unable to resolve target 'android ...
- 开发QQ互联ios版Ane扩张 辛酸史
来源:http://www.myexception.cn/operating-system/1451490.html 开发QQ互联ios版Ane扩展 辛酸史 开发QQ互联ios版Ane扩展辛酸史: 1 ...
- 腾讯微信被怼,iOS版微信不能打赏了
2017年4月19日,估计很多有着大量粉丝的微信自媒体作者会感到很不爽,因为他们的苹果粉丝再也无法很爽快地.肆意.任性地打赏他们了,按目前iphone手机的占有率,估计打赏率会掉一半以上. 据微信派微 ...
- Kubernetes - 腾讯蓝鲸配置平台(CMDB)开源版部署
蓝鲸CMDB 蓝鲸配置平台(蓝鲸CMDB)是一个基于运维场景设计的企业配置管理服务.主要功能: 1. 拓扑化的主机管理:主机基础属性.主机快照数据.主机归属关系管理 2. 组织架构管理:可扩展的基于业 ...
- 转:探秘腾讯Android手机游戏平台之不安装游戏APK直接启动法
前言 相信这样一个问题,大家都不会陌生, “有什么的方法可以使Android的程序APK不用安装,而能够直接启动”. 发现最后的结局都是不能实现这个美好的愿望,而腾讯Android手机游戏平台却又能实 ...
- 探秘腾讯Android手机游戏平台之不安装游戏APK直接启动法
前言相信这样一个问题,大家都不会陌生,“有什么的方法可以使Android的程序APK不用安装,而能够直接启动”.发现最后的结局都是不能实现这个美好的愿望,而腾讯Android手机游戏平台却又能实现这个 ...
- 视频直播SDK-ios版
IOS视频直播接入说明 一.名词解释 分辨率:用于计算机视频处理的图像,以水平和垂直方向上所能显示的像素数来表示分辨率.常见视频分辨率的有1080P即1920x1080,720P即1080x720,6 ...
- Ubuntu 18.04下安装Steam顶级在线游戏平台
Ubuntu 18.04下安装Steam顶级在线游戏平台 原创: 聆听世界的鱼 Linux公社 今天 Steam是由Valve公司开发的顶级在线游戏平台,是目前全球最大的综合性数字发行平台之一.它让你 ...
- ios版弹珠游戏源码
这个是我们比较喜欢玩的一直小游戏的,ios版弹珠游戏源码,该游戏源码来着IOS教程网其他网友提供上传的,大家可以了解一下吧. nore_js_op> <ignore_js_op&g ...
随机推荐
- 宏page_t
/** Type of the index page */ typedef byte page_t;
- onAttachedToWindow () 和 onDetachedFromWindow () ; 以及更新视图的函数ondraw() 和dispatchdraw()的区别
protected void onAttachedToWindow() This is called when the view is attached to a window. At this po ...
- 实用Python 语句集(入门者入)
1. Python IDLE中切换当前路径 在Python自带的编辑器IDLE中或者Python shell中不能使用cd命令,那么跳到目标路径呢. 方法是使用os包下的相关函数实现路径切换功能. i ...
- 并发编程之--ConcurrentSkipListMap
概要 本章对Java.util.concurrent包中的ConcurrentSkipListMap类进行详细的介绍.内容包括:ConcurrentSkipListMap介绍ConcurrentSki ...
- 《深入Java虚拟机学习笔记》- 第11章 类型转换
Java虚拟机包括许多进行基本类型转换工作的操作码,这些执行转换工作的操作码后面没有操作数,转换的值从栈顶断获得.Java虚拟机从栈顶端弹出一个值,对它进行转换,然后再把转换结果压入栈. int.lo ...
- jQuery mobile 核心功能
原文地址:http://jquerymobile.com/demos/1.0b2/#/demos/1.0b2/docs/about/features.html 基于 jQuery 核心,使用和jQue ...
- python错误收集
Installing 'flask'You are using pip version 6.1.1, however version 7.1.2 is available.You should con ...
- Leetcode OJ : Repeated DNA Sequences hash python solution
Total Accepted: 3790 Total Submissions: 21072 All DNA is composed of a series of nucleotides abb ...
- HW6.26
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- algorithm@ Divide two integers without using multiplication, division and mod operator. (Bit Operation)
#include<bits/stdc++.h> using namespace std; int divide(int dividend, int divisor) { long long ...