When you create a static library you don't link in the dependent libraries. As a result, when you rename one of the files from .m to .mm it starts to now depend on C++ features such as stack unwinding when receiving exceptions. Even if you tell the compiler that you have no intent of using exceptions (by the denial of C++ exceptions in the compile flags), it still needs to known the potential mechanism for stack unwinding (this is what the personality variable means).

The reason why the template apps from Cocos2d+Box2d don't have this problem is that they possess some .mm files; as a result the c++ compiler is used to perform the final link, which pulls in the c++ library automatically.

https://stackoverflow.com/questions/18804414/xcode-why-does-renaming-to-mm-fail-with-undefined-symbol-gxx-personality-s

.mm c++ oc 混编的更多相关文章

  1. Swift数独游戏优化——C++与OC混编、plist自动生成

    一.为什么要C++与OC混编? 在我之前的数独游戏中涉及到的数独游戏生成算法是参考的网上其他人的算法,是利用C++来实现的.   但是在我的例子中我发现这样存在一定的局限性: 1.我是利用Termin ...

  2. iOS开发之swift与OC混编出现的坑,oc中不能对swift的代理进行调用,不能访问swift中的代理,swift中的回调方法

    1. Swift与oc混编译具体怎么实现,这儿我就不重复讲出了,网上有大把的人讲解. 2. 在swift与OC混编的编译环境下, oc类不能访问swift创建类中的代理? 解决方法如下: 在代理的头部 ...

  3. iOS 静态类库 打包 C,C++文件及和OC混编

    iOS 静态类库 编译 C,C++ 我们都知道,OC 原生支持C, 在 创建的 OC类的 .m 里面,可以直接编写C的代码: 同样 Xcode 也支持 OC ,C++的混编,此时,我们通常把OC创建的 ...

  4. swift c++ oc 混编

    http://www.tuicool.com/articles/QZNrErM iOS 里面 Swift与Objective-C混编,Swift与C++混编的一些比较 时间 2015-03-23 23 ...

  5. iOS之 C++与oc混编

    声明:本文只是随笔,自己做个笔记方便以后查阅如要转载,注明出处.谢谢! 2016年第一篇随笔!!! 由于最近要搞一个项目用到c++的一些api所以要混编,于是就记录下这个过程中的一些细节上的东西! O ...

  6. Swift & OC 混编 浅析

    转载自:http://www.infoq.com/cn/articles/wangyi-cartoon-swift-mixed-practice?utm_campaign=rightbar_v2&am ...

  7. cocoapod Podfile use frameworks swift/oc混编 could not build module xxx

    前置: 知名的pod: AFNetworking 我自己的pod:  AFNetworking+RX  3.1.0.18 里面有一段代码是: #import <Foundation/Founda ...

  8. iOS8开发~Swift(五)Swift与OC混编

    一.概要 首先看<The Swift Programming Language>中提到"Swift's compatibility with Objective-C lets y ...

  9. Swift与OC混编

    OC调用Swift的方法:添加 import "xxxx-Swift.h" 头文件即可 Swift调用OC的方法:需要建立桥接: xxxx-Bridging-Header.h 头文 ...

随机推荐

  1. eclipse的Java项目修改后要不要重启tomcat问题

    tomcat服务器重新部署工程或者修改了项目的代码就必须重启tomcat吗? 答: omcat服务器重新部署工程或者修改了项目的代码就必须重启tomcat吗?有没有不重启的方法,或者其他高效点的,让服 ...

  2. fastjson将java list转为json字符串

    1.直接用fastjson的静态方法string JSON.toJSONString(list)方法就行,JSON.toJSONString(list)将java list转为json字符串. 2.t ...

  3. PHP array_multisort()

    定义和用法 array_multisort() 函数对多个数组或多维数组进行排序. 参数中的数组被当成一个表的列并以行来进行排序 - 这类似 SQL 的 ORDER BY 子句的功能.第一个数组是要排 ...

  4. [Vue @Component] Pass Props Between Components with Vue Slot Scope & renderless component

    Components with slots can expose their data by passing it into the slot and exposing the data using  ...

  5. UltraEdit UE如何设置自动换行

    1如何设置Ultraedit自动换行     学过编程方面电脑知识的朋友可能都清楚,ultraedit是一款易用强大的文本编辑工具.并且打开没有Unicode签名(BOM)的UTF-8格式半角英文文件 ...

  6. 记录 mysql sql limit 0,100问题

    某个场景分页查询出第一页的数据,, limit 0,100  第一页 limit 100,100 第二页 limit 200,100 第三页 select * from user limit 0,10 ...

  7. Protected vs protected internal (Again) in c#

    http://stackoverflow.com/questions/22940317/protected-vs-protected-internal-again-in-c-sharp protect ...

  8. 91. Ext中获取combobox中的valueField和displayField的值

    转自:https://blog.csdn.net/jcy472578/article/details/42113119Ext.getCmp("schemaVersion").val ...

  9. ubuntu查看'任务管理器'

    ubuntu下的任务管理器打开方式:命令行输入'gnome-system-monitor'即可,展示如下:

  10. Maya Calendar

    http://poj.org/problem?id=1008 按第一种记录方法算出总天数,然后按第二种记录方式输出. #include<stdio.h> #include<strin ...