l x (whereisit28@yahoo.com) wrote: > Hi, > > I found a very stange problem related to header file > includ. Could some one take a look and see what > causes the problem? > > One C source file needs to include 2 system header > files scsi.h and hosts.h. They both are under > /usr/src/linux-2.4.18-14/drivers/scsi/ and hosts.h > uses structures defined in scsi.h. > > To avoid using hard-coded path when including them in > the c file, the following two lines are added to the > Makefile: > > INCLUDE_PATH = -I$//usr/src/linux-`uname > -r`/drivers/scsi > [...] > Everything is compiled okay. This means the path > included in the Makefile works okay because it can > find hosts.h. > > (2) If I include them like this: > > #include <scsi.h> > #include <hosts.h> > > Compile errors show structures used by hosts.h can not > be found, meaning scsi.h can not be found. > > This is strange. Why only one header file can be > found but not the other while both of them are in the > same directory? What can be wrong? I think you must include them by : #include "scsi.h" #include "hosts.h" Perhaps I make a mistake, If it is true, please correct me :-) Have a good day :) -- Amicalement Christophe * GNU/Linux & UNIX developer and network administrator * Membre RotomaLUG (http://www.rotomalug.org) * Registered User #271267 * Email: c.lucas@ifrance.com * Web Site: http://odie.mcom.fr/~clucas/ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/