After having used dozens of compilers on several different operating systems, my advice is to use
only for system and operating-specific header includes, and "y.h"
for everything else, including your libraries and project headers.
Then you set up the appropriate inclusion search paths using your compiler's -I
(or whatever) option. This is easier if you use something like make
or ant
to do your builds.
For third-party software headers, you could go with either form. If the package is installed and accessible to all users (e.g., in somewhere like /usr/local/bin
or /usr/site/bin
), then the
form is probably more correct. If it's installed within your local build tree, then the "y.h"
form is more correct, since it's controlled within your build process.
This combination is the most portable.