Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!helios!stat!john From: john@stat.tamu.edu (John S. Price) Newsgroups: comp.lang.c Subject: Re: help with UNIX include files Message-ID: <4107@helios.TAMU.EDU> Date: 20 Jan 90 05:42:25 GMT References: <1990Jan16.202640.357@csusac.csus.edu> <4092@helios.TAMU.EDU> <602@sagpd1.UUCP> Sender: usenet@helios.TAMU.EDU Reply-To: john@stat.tamu.edu (John S. Price) Distribution: usa Organization: Statistics Department, Texas A&M University Lines: 28 In article <602@sagpd1.UUCP> jharkins@sagpd1.UUCP (Jim Harkins) writes: >In article <4092@helios.TAMU.EDU>, john@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@stat.tamu.edu | And everyone's path is different... - Me --------------------------------------------------------------------------