在框架模块中包含非模块化头 [英] Include of non-modular header inside framework module

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

问题描述

我使用xcode 6,

I am using xcode 6,

1)首先我创建动态库(coreLibrary)。
此库包含RequestPoster.h文件

1)firstly i am creating dynamic library(coreLibrary). this library contain RequestPoster.h file

2)然后我创建Coca Touch Framework并添加这个动态库(coreLibrary)。

2)Then i create Coca Touch Framework and add this dynamic library(coreLibrary).

3)然后这个框架被添加到我的项目,它提供错误在RequestPoster.h文件(coreLibrary)
错误:包括非模块化头框架模块
类:

3)Then this framework is add on my project and it gives error in RequestPoster.h file(coreLibrary) error : Include of non-modular header inside framework module class :

ifaddrs.h,arpa / inet.h,sys / types.h>

ifaddrs.h, arpa/inet.h, sys/types.h>

推荐答案

尝试在目标下创建设置并设置允许非模块化包含在框架模块中为YES。

Try going Build Settings under "Target" and set "Allow Non-modular Includes in Framework Modules" to YES.

真正的答案是导入的位置需要由库所有者更改。那些文件ifaddrs.h,arpa / inet.h,sys / types.h正在框架中的.h文件中导入,XCode不喜欢。库维护者应将它们移动到.m文件。例如,在Github上查看此问题,其中AFNetworking修复了相同的问题: https://github.com/AFNetworking/AFNetworking/issues / 2205

The real answer is that the location of the imports needs to be changed by the library owner. Those files ifaddrs.h, arpa/inet.h, sys/types.h are getting imported in a .h file in a framework, which XCode doesn't like. The library maintainer should move them to a .m file. See for example this issue on Github, where AFNetworking fixed the same problem: https://github.com/AFNetworking/AFNetworking/issues/2205

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

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