GNU C编译器找不到头文件

时间:2011-10-20 14:52:37

标签: c header compilation

我在我的机器上安装了一个包libstree(x86_64 / Redhat Linux)。

按照说明(./configure --prefix=/usr; make check; make install)安装软件包。

检查相关的头文件是否在/usr/include/usr/lib目录中。

但是当我尝试编译测试程序时,我收到一条错误消息:

test.c:6:25: fatal error: lst_structs.h: No such file or directory
compilation terminated.

lst_structs.h出现在/usr/include/stree目录中。

任何人都有任何想法为什么GNU C编译器找不到头文件?

1 个答案:

答案 0 :(得分:1)

由于它位于/ include子目录中,您需要明确提及它(请参阅上面的注释),或者调整lib包含路径,如旧的stackoverflow帖子所述: How to add a default include path for gcc in linux?