On Sun, 26 May 2013 at 20:29:15 +0200, Rodolfo García Peñas wrote: > > > +#endif /* WMSWITCHMENU_H */ > > > diff --git a/src/winspector.c b/src/winspector.c > > > index 41d3afb..59b56f2 100644 > > > --- a/src/winspector.c > > > +++ b/src/winspector.c > > > @@ -47,6 +47,7 @@ > > > #include "client.h" > > > #include "wmspec.h" > > > #include "misc.h" > > > +#include "switchmenu.h" > > > > > > #include <WINGs/WUtil.h> > > > > Shouldn't switchmenu.h include at least the definition of WScreen? > > Yes/No. > > Yes, because switchmenu.h includes WScreen and WWindow types, defined at > screen.h and window.h. > No, because switchmenu.h is included before screen.h and window.h includes.
You can't rely on the order in which the files are included because otherwise things become fragile and simple changes can break the build. > Here, you can choose the right option. I will do the patch if needed. It's better to include them, see rule #9 of that guide. [mafra@rMBP:wmaker.git]$ gcc src/switchmenu.h src/switchmenu.h:25:23: error: unknown type name ‘WScreen’ src/switchmenu.h:25:37: error: unknown type name ‘WWindow’ src/switchmenu.h:26:21: error: unknown type name ‘WScreen’ but I guess one also needs to change the #include "config.h" to #include "../config.h" in src/wconfig.h.in Many .h files do not currently "compile". -- To unsubscribe, send mail to [email protected].
