[GRASS-dev] errors compiling nviz in GRASS 7

Glynn Clements glynn at gclements.plus.com
Thu Jul 10 00:23:40 EDT 2008


William Kyngesburye wrote:

> >> It appears X, Y and Z (all caps, that is) are defined in gstypes.h  
> >> in GRASS.  I was able to fix the problem by moving the lines in  
> >> nviz.h:
> >>
> >> #include <grass/gsurf.h>
> >> #include <grass/gstypes.h>
> >>
> >> to *after* the GL includes.
> 
> But, there is this in gui/wxpython/nviz/nviz.h:
> 
> #include <grass/gis.h>
> #include <grass/gsurf.h>
> #include <grass/gstypes.h>
> #include <grass/nviz.h>
> 
> Since <grass/nviz.h> already includes gsurf.h and gstypes.h, perhaps  
> those should be removed to let <grass/nviz.h> handle the proper  
> include order?

Any source or header file which uses types or macros from a header
file should explicitly include that header file.

Header files should guard against repeated inclusion; AFAICT, all of
the headers mentioned here do so.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list