[英]Xcode preprocessor macros to include system style headers
我试图手动将freetype 2.9.0作为框架构建目标添加到我的Xcode玩具项目中。 Freetype使用预处理器宏将其标头包含在尖括号( <freetype/config/xx.h>
)中,这使Xcode构建系统感到困惑,并且出现expected "FILENAME" or <FILENAME>
的错误expected "FILENAME" or <FILENAME>
,这表明它找不到我的系统级别包括。 不用对子文件夹头进行硬编码,我将如何配置Xcode构建系统以查找这些配置文件?
我在另一个文件中尝试过
#define SOME_CONFIG <glfw/glfw3.h> /*this header is included as a system header in a subfolder <project/glfw/... , and works fine*/
#ifdef SOME_CONFIG
#include SOME_CONFIG
#endif
而且效果很好。 但是,当我尝试使用freetype时,无法在宏中找到扩展。
Freetype包含结构如下所示:
include/ftbuild.h -- points to include/freetype/config/ftheader.h
include/config/ftheader.h -- has all the #define macros to ->
include/config/... -- a bunch of headers with options which Xcode refuse to see
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.