在静态库中读取.pch文件 [英] Reading .pch file in static library

查看:270
本文介绍了在静态库中读取.pch文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个静态库,并添加我想暴露给其他项目的所有项目文件。现在,我有一个.pch文件,其中包含我的#import语句,将在整个应用程序中使用。

I am creating a static library and adding all the project files which I want to expose to other projects. Now, I have a .pch file which contains most of my #import statements which is to be used throughout the application.

编译此静态库时,的这些缺失的import语句。我尝试在复制头和复制源复制.pch文件,但它不工作。

When compiling this static library I am getting errors because of these missing import statements. I tried copying the .pch file in "Copy header" as well as "Copy source" but it did not work.

任何线索如何添加.pch文件一个静态库。

Any clue how to add a .pch file in a static library.

推荐答案

进入项目构建设置,搜索pch。有一个名为前缀标题的项目,您可以在其中输入PCH文件的名称。

Go into the project build settings, and search for "pch". There's an item called "Prefix Header" where you can enter the name of your PCH file.

这篇关于在静态库中读取.pch文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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