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

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

问题描述

我使用的是 Xcode 6,

I am using Xcode 6,

1) 首先,我正在创建一个动态库 (CoreLibrary).该库包含 RequestPoster.h 文件.

1) Firstly I am creating a dynamic library (CoreLibrary). This library contain RequestPoster.h file.

2) 然后我创建了一个 Cocoa Touch 框架并添加了这个动态库 (CoreLibrary).

2) Then I create a Cocoa Touch Framework and added 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>

在项目中找不到这些文件.

These file not found in the project.

推荐答案

确保头文件作为框架公共头文件的一部分公开可用.

Make sure the header files are publicly available as part of the framework's public headers.

Goto Framework -> Target -> Build Phases 并拖动以将相关头文件从 Project 移动到 Public.希望有帮助!

Goto Framework -> Target -> Build Phases and drag to move the relevant header files from Project to Public. Hope that helps!

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

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