美文网首页
iOS .mm文件Undefined symbols和Linke

iOS .mm文件Undefined symbols和Linke

作者: KeyboardDirver | 来源:发表于2024-04-07 19:47 被阅读0次

OC与C++混编需要将.m文件修改为.mm文件。 这个在pod中的.mm文件有2个报错。
1、Undefined symbols:
2、Linker command failed with exit code 1 (use -v to see invocation)

解决方案在podspec中添加
s.libraries = 'c++'
重新执行pod install即可

相关文章

网友评论

      本文标题:iOS .mm文件Undefined symbols和Linke

      本文链接:https://www.haomeiwen.com/subject/axdtxjtx.html