help with UNIX include files

Mike Tietel mike at ntmtka.mn.org
Thu Jan 18 02:29:18 AEST 1990


In article <4092 at helios.TAMU.EDU>, john at stat.tamu.edu (John S. Price) writes:
> If you use #include <foo.h>, cpp will look for this file in 
> /usr/include (it will look for /usr/include/foo.h).  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".
> This sounds like your problem to me.
> 

Rather than using  #include "/path.../foo.h"
use  #include "foo.h"  with the  -I/path...  option for cpp.
That way if the pathname changes for the header file, you won't
need to edit every source file, you'll just need to change one
string in the Makefile.

-- 
Mike Tietel
Northern Telecom, Inc.       (612) 932-8017
9701 Data Park, H-200        mike at ntmtka.mn.org
Minnetonka, MN 55343         {rosevax,bungia}!ntmtka!mike



More information about the Comp.lang.c mailing list