Martin Spott wrote:
> While I'm digging through the sources in the hope to find the cause
> for some mislead header includes I wondered about notation of
> several include statements. To my knowledge system includes should
> be bordered by brackets:
It's not really well specified. Usually: using angle brackets means
to search the system standard directories, followed by directories
specified on the compiler command line; using quotes means to search
the directory containing the source file, followed by command line
directories.
There are two source code conventions I've seen:
1.) Use quotes for all "project-local" files, even those not in the
same directory as the C files including them. Use angle brackets
*only* for stuff expected to be installed globally on the system.
This has the problem that a common name like config.h might exist
in multiple directories and there's no easy way to say "I want the
one in my own directory please". It makes it difficult to have a
local namespace for your own headers in a big project.
2.) Use quotes *only* for things on the local directory, and angle
brackets for everything else. I like this one, but I have seen
build systems that complain about missing include files because
they are specified with angle brackets but not in the "system"
directories.
Andy
_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d