OC 和 C++ 混编

原文出处:
     http://blog.csdn.net/fengsh998/article/details/8010696

个人要点总结:
      在 Xcode 中,Compile Sources As 的默认选项为 According to File Type。
不改变该设置的前提下,如果要在某个类中使用 C++ 代码,则必须把该类的后缀
由 .m 改为 .mm.
 
     如果把 Compile Sources As  改为 Objective-C++,则无需把 类的后缀改为 .mm。

猜你喜欢

转载自lisai.iteye.com/blog/1953299
今日推荐