iOS开发-Swift、OC、OC++混编的故事

故事背景:从未处理过音频,最近做红外码转音频功能,涉及到C++;于是需要用到多语言混编;(大于2为多,所以我叫它多语言混编)

我滴天,快崩溃了Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules

借问方案何处有,网友遥指stackoverflow.com;

都是浮云,还是自己摸索出来了。

-fcxx-modules

就是它==>Build Phases ==>Compile Sources==>找到引用Swift的C++文件==>双击这个mm文件右侧空白地方==>在弹窗内速入“-fcxx-modules”

解决了,下班。苦逼。

发布了50 篇原创文章 · 获赞 12 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/u010289343/article/details/104010771