[GRASS-dev] WinGrass65 + import gui_modules.nviz_tools as
nviz_tools: ImportError
Glynn Clements
glynn at gclements.plus.com
Mon Jun 21 15:58:28 EDT 2010
Martin Landa wrote:
> >>In that case, I'm all out of ideas.
> >
> > maybe Martin can have a look at the error log of the nightly WinGrass7-builds, if WinGrass7 compiles correctly there?
>
> I am getting something different...
> c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include/grass/gisdefs.h:117:
> warning: `libintl_printf' is an unrecognized format function type
> c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include/grass/nviz.h:37,
> from render.c:16:
[snip]
> Traceback (most recent call last):
> File "./ctypesgen.py", line 134, in <module>
This doesn't make any sense, for two reasons:
1. How is render.c getting into the ctypesgen wrapper generation
process? ctypes generates a temporary .h file which #include's various
.h files. No .c files should be getting processed.
2. The error relates to an invalid __attribute__ qualifier.
2.1 These should be getting replaced by the empty string due to gis.h
and the fact that ctypesgen undefines __GNUC__:
#if !defined __GNUC__ || __GNUC__ < 2
#undef __attribute__
#define __attribute__(x)
#endif
2.2 Attribute qualifiers are dealt with by the compiler, but ctypesgen
only invokes the preprocessor.
> c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include/grass/gisdefs.h:117:
> warning: `libintl_printf' is an unrecognized format function type
If you're getting this error while compiling lib/nviz, the problem is
caused by:
#include <grass/glocale.h>
#include <grass/nviz.h>
<grass/gis.h> should be include *before* <grass/glocale.h>.
The reason is that glocale.h includes <libintl.h>, which #define's
printf to libintl_printf.
This affects the __attribute__((format(printf,...))) qualifiers,
causing the above error.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list