美文网首页ios进阶酷
编译错误include of non-modular heade

编译错误include of non-modular heade

作者: S_Lyu | 来源:发表于2017-09-28 11:34 被阅读10次

错误信息

image.png

原因之一:swift使用OC库

swift 的调用需要moudle 定义。将 buildsetting 里的 DEFINES_MODULE 设置为YES。就会额外编译一个
module.modulemap 的文件。有了这个文件swift 才能正常编译。
这个文件的内容可以看到如下:

framework module ProtocolBuffers {
  umbrella header "ProtocolBuffers.h"

  export *
  module * { export * }
}

这里我的库为 ProtocolBuffers.h 所以 你需要在framework 的目录下新建一个 module.modulemap 的文件。并更改framework 的目录为以下样子:

framwork_moudle_map.png
原文地址

相关文章

网友评论

    本文标题:编译错误include of non-modular heade

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