[wx-dev] Question about trunk sample includes, should <> be used instead of ""

Vadim Zeitlin vadim at wxwidgets.org
Sat Feb 2 11:39:58 PST 2008


On Sat, 02 Feb 2008 08:35:12 -0500 Tim S <stahta01 at netzero.com> wrote:

TS> I have an question about trunk sample code includes, should <> be used 
TS> instead of "" in the #include section like in case of below?

 No because I believe some compilers wouldn't then take these headers into
account when creating dependencies information (although this isn't the
case when using g++, even though we use -MMD and not -MD, I wonder why...)
and while this is usually just what you need when you write applications
using wx, it wouldn't be convenient for the samples which are also used to
test it by us and so we do want them to be recompiled when wx headers
change.

TS> I have an idea that replaces the include of wx/wx.h with a new header of 
TS> wx_forward.h an header that does forward declarations of wxWidgets 
TS> classes.

 Could you please explain a bit better what exactly do you intend to do?
The idea as stated doesn't seem to be worth pursuing to me: while forward
declarations should be used by "real" programs, most samples intentionally
include wx/wx.h just because this keeps them simple and we don't want to
complicate them unnecessarily.

TS> And, I think it might be a good idea to change the quotes to 
TS> square brackets at the same time.

 No, definitely not, it's not a good idea to do 2 changes at once.

 Thanks,
VZ





More information about the wx-dev mailing list