I try to compile Xastir on Cygwin using GraphicMagick. I uninstalled ImageMagick.

I get the following error:

  map_geo.c: In function `draw_geo_image_map':
  map_geo.c:1907: error: too few arguments to function `GetNumberColors'
map_geo.c:1914: warning: implicit declaration of function `CompressColormap'
  map_geo.c:2117: error: too few arguments to function `GetNumberColors'
  map_geo.c:2117: warning: int format, long unsigned int arg (arg 3)
  map_geo.c:2125: error: too few arguments to function `IsGrayImage'
  map_geo.c:2126: error: too few arguments to function `IsMonochromeImage'
  make[3]: *** [map_geo.o] Error 1

GraphicMagicks's color.h header says "GetNumberColors" needs 3 arguments:

  extern MagickExport unsigned long
    GetNumberColors(const Image *,FILE *,ExceptionInfo *);

The code im map_geo.c looks like this:

  #if (MagickLibVersion < 0x0540)
if (visual_type == NOT_TRUE_NOR_DIRECT && GetNumberColors(image, NULL) > 128) {
  #else   // MagickLib >= 540
if (visual_type == NOT_TRUE_NOR_DIRECT && GetNumberColors(image, NULL, &exception) > 128) {
  #endif  // MagickLib Version

It looks like this 0x0540 is an *ImageMagick* version nummber. GraphicMagick has in version.h:

  #define MagickLibVersion  0x000008

Which causes the wrong call for GetNumberColors with only 2 arguments.

The easiest solution is to just drop support for ImageMagick < 0x0540...

Kind regards,

Henk.
_______________________________________________
Xastir-dev mailing list
[email protected]
http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir-dev

Reply via email to