Properly use #include <> and #include ""

Andreas Pakulat apaku at gmx.de
Fri Jun 15 14:51:52 BST 2007


On 15.06.07 15:13:22, Matthias Kretz wrote:
> On Friday 15 June 2007, Andreas Pakulat wrote:
> > If I understood correctly a public header in the shell library should
> > use #include "foobar.h" for any header that is also inside the shell
> > library. However it should use #include <barfoo.h> for any system-header
> > and also headers from other libraries of the kdevplatform module. Is
> > that correct? If not, whats the correct way here?
> 
> Just a small correction: You don't have to draw the line between every single 
> library. If two or more libs ship together (e.g. kdecore, kdeui, kio, ...) 
> they should prefer "" to <> to include headers from the other lib because the 
> relative position of the header (when installed) is known. Only when the 
> relative position is not known (e.g. Qt headers and system headers) should 
> you include headers with <>.

Thats not what kdelibs does, as far as I can see. kdeui-header use <> to
include kdecore headers.

Andreas

-- 
A long-forgotten loved one will appear soon.

Buy the negatives at any price.




More information about the kde-core-devel mailing list