![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
When a header file specification is surrounded by angle brackets <...>
, the C compiler first looks for
that header file in a directory known by your C compiler to contain
header files for the standard library. Later on, when the C compiler
needs the object code corresponding to the function prototypes in a header
file, it looks for that object code in a directory known to contain the
standard library file.
In contrast, when the file specification is surrounded by double-quotation
marks, "..."
, the C compiler first looks for the header file in
the current directorywhich is presumably the same one that contains the
source-code file.
Whenever the first look produces no header file, most compilers look elsewhere. For file specifications with angle brackets, the second look is likely to be the current directory; for file specifications with double-quotation marks, the second look is likely to be the standard library's directory.
Many compilers also allow you to specify additional places to look by way of a command-line argument.