"包括框架模块&QUOT内非模块化头的;在SSZipArchive的C头 [英] "Include of non-modular header inside framework module" in C header of SSZipArchive

查看:462
本文介绍了"包括框架模块&QUOT内非模块化头的;在SSZipArchive的C头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用 SSZipArchive objc库在我的雨燕的iOS项目。

I'm trying to use SSZipArchive objc library in my Swift iOS Project.

我做了什么:


  1. 创建一个Objective-C可可触摸框架

  2. 本指南导入SSZipArchive的目标C和C文件到它。

  3. 改变所有的C头文件对公众按照这个答案

  4. 更改构建设置允许非模块化包括按照这个答案

  1. Created an Objective-C "Cocoa Touch Framework"
  2. Followed this guide to import SSZipArchive's objective C and C files into it.
  3. Changed all C headers to public as per this answer
  4. Change build settings to allow non-modular includes as per this answer

该框架编译罚款。我会设法使用通过这种方式斯威夫特项目目标的C库之前,所以我想的步骤是正确的?

The framework compiles fine. I'd manage to use objective C libraries in Swift projects using this way before so I guess the steps are correct?

现在的问题是,当我尝试做进口SSZip在我的项目,并尝试编译,它给包括非模块化的框架头模块内的错误每个SSZipArchive的C头文件的,我已经试过所有可能的解决方案,我可以没有成功在网上找到。好像这个问题上zlib.h中心

The problem right now is when I try do Import SSZip in my project and try to compile, it gives "Include of non-modular header inside framework module" errors for each of the C header files of SSZipArchive and I've tried all possible solutions I can find online with no success. Seems like the problem centers on zlib.h

请帮助..现在我卡住了一个多星期,我无法找到任何替代品解压缩在迅速的一个文件。

Please help.. I'm stuck for more than a week now and I couldn't find any alternatives to unzip a file in swift.

推荐答案

我得到这个工作。你需要将所有从它的.h文件导致问题出来了#包括,把他们在其.c文件代替。之后,清洁并重新编译和错误消失,一切工作。

I got this to work. You need to move all the #includes that causes problem out from its .h file and put them in its .c file instead. After that clean and recompile and the error goes away and everything works.

这篇关于"包括框架模块&QUOT内非模块化头的;在SSZipArchive的C头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆