Help - header include issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

CC_INCLUDE += $(INCLUDE_PATH)


(1) If I include them like this:

#include
</usr/src/linux-2.4.18-14/drivers/scsi/scsi.h>
#include <hosts.h>

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? 

Thanks,

T.




	
		
__________________________________
Do you Yahoo!?
Yahoo! Domains ? Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux