Properly use #include <> and #include ""

Matthias Kretz kretz at kde.org
Fri Jun 15 14:13:22 BST 2007


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 <>.

But I've heared different opinions on this, though no arguments to convince 
me, yet.

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070615/293d2c54/attachment.sig>


More information about the kde-core-devel mailing list