help with UNIX include files

John S. Price john at stat.tamu.edu
Sat Jan 20 16:42:25 AEST 1990


In article <602 at sagpd1.UUCP> jharkins at sagpd1.UUCP (Jim Harkins) writes:
>In article <4092 at helios.TAMU.EDU>, john at stat.tamu.edu (John S. Price) writes:
>> If the include
>> files aren't there, you must use #include "/path.../foo.h", or if it
>> is in the directory you are compiling from, use #include "foo.h".
>
>Close, but this ain't horseshoes.  If you use #include "foo.h" the compiler
>looks for foo.h in the directory the source file is in, not neccesarily
>the directory you are compiling from.  For example, if you are in 
>the directory
>fred and issue the command 'cc ../src/foo.c', foo.h will only be found if
>it lives ../src, not if it lives in fred.
>
>jim
>"only dead fish go with the flow."

Well, actually, that's what I meant, but now that I read what I wrote,
I can see how waht I wrote could be taken wrong.   I did mean 
where the source program was, not where you were compiling from.
But, since I almost ALWAYS compile where my source program resides,
I made this slight error.

Sorry for that mistake...

--------------------------------------------------------------------------
John Price                   |   Morals define our path through life,
john at stat.tamu.edu           |   And everyone's path is different... - Me
--------------------------------------------------------------------------



More information about the Comp.lang.c mailing list