Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: stahta01 on October 10, 2007, 08:38:12 am
-
FYI:
I have been thinking that it would be a good idea to have a list of rules on using headers in Code::Blocks.
I have figured out some possible rules from killerbot and thinking about it myself.
Please comment about these rules and suggest others.
Tim S
killerbot inspired ones.
1. If possible, headers should use forward declarations instead of includes.
2. Headers should never include pre-compiled headers like [sdk.h] or [wxprec.h].
Do not include sdk.h in headers
Do not include wxprec.h in headers
Do not use WX_PRECOMP in headers
Do not use CB_PRECOMP in headers
Ones I decided on by myself.
3. Used system includes in plugins for C::B SDK and wxWidgets includes.
In plugins, use [#include <sdk.h>] instead of [#include "sdk.h"]
4. Do not use [#include <wx/wx.h>] in either production headers or source code.