0

I have installed a package libstree on my machine (x86_64/Redhat Linux).

Have followed the instructions ( ./configure --prefix=/usr; make check; make install) to install the package.

Have checked that the relevant header files are in the /usr/include and /usr/lib directories.

However when I try to compile a test program I get an error message:

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

lst_structs.h is present in the /usr/include/stree directory.

Anyone have any thoughts as to why the GNU C compiler cannot locate the header file?

3
  • 1
    Are you including the file with #include <stree/lst_structs.h> or #include <lst_structs.h>? Commented Oct 20, 2011 at 15:17
  • 1
    Please show how you are including the file. Commented Oct 20, 2011 at 15:18
  • Did you do #include <stree/lst_structs.h>, or #include <lst_structs.h>? Commented Oct 20, 2011 at 15:18

1 Answer 1

1

As it's in an /include sub-directory, you need to explicitly mention it (see comments above), or adjust your lib include path, as outlined on this old stackoverflow post: How to add a default include path for gcc in linux?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.