我在我的机器上安装了一个包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编译器找不到头文件?
答案 0 :(得分:1)
由于它位于/ include子目录中,您需要明确提及它(请参阅上面的注释),或者调整lib包含路径,如旧的stackoverflow帖子所述: How to add a default include path for gcc in linux?