This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
HI,The usual convention, reinforced by cursory examination of a C textbook, is that #include <...> starts the search in the system include directories, not in the path specified by -I. Why not try the usual #include "...." ?
I'm on Fedora Core 4, with GNU C version 4.0.0 20050519 (Red Hat 4.0.0-8) (i386-redhat-linux).
I have this directory structure:
test / \ / \ hello.c include \ hello.h
hello.c contains #include <include/hello.h> if I would need to compile hello.c into an executable, does this sound right ?
[root@localhost test]# gcc -I ./include/ hello.c
I'm getting an error: hello.c:2:27: error: include/hello.h: No such file or directory
I've no idea where I might be going wrong with this
one.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |