[cairo] cairo-win32-display-surface.c(467) : error C2039: 'base' : is not a member of '_cairo_surface'

Hans Breuer hans at breuer.org
Sun Jun 24 04:10:08 PDT 2012


Just tried to build cairo 1.12 from git myself, but it fails with:

win32\cairo-win32-display-surface.c(467) : error C2039: 'base' : is not a 
member of '_cairo_surface'
         D:\Devel\from-git\cairo\src\cairo-surface-private.h(51) : see 
declaration of '_cairo_surface'
win32\cairo-win32-display-surface.c(467) : warning C4090: 'function' : 
different 'const' qualifiers
win32\cairo-win32-display-surface.c(467) : error C2198: 
'_cairo_surface_map_to_image' : too few arguments for call
win32\cairo-win32-display-surface.c(491) : warning C4244: '=' : conversion 
from 'double' to 'int', possible loss of data
win32\cairo-win32-display-surface.c(492) : warning C4244: '=' : conversion 
from 'double' to 'int', possible loss of data
win32\cairo-win32-display-surface.c(502) : error C2039: 'base' : is not a 
member of '_cairo_surface'
         D:\Devel\from-git\cairo\src\cairo-surface-private.h(51) : see 
declaration of '_cairo_surface'
win32\cairo-win32-display-surface.c(502) : warning C4133: 'function' : 
incompatible types - from 'cairo_image_surface_t *' to 'cairo_surface_t *'
win32\cairo-win32-display-surface.c(502) : error C2198: 
'_cairo_surface_unmap_image' : too few arguments for call


My naive approach to make it compile leads to a stack overflow - endless 
recursion between
	_cairo_win32_display_surface_map_to_image ()
and
	_cairo_surface_map_to_image+0x46 ()

with:

diff --git a/src/win32/cairo-win32-display-surface.c 
b/src/win32/cairo-win32-display-surface.c
index 0d4c5f9..880de00 100644
--- a/src/win32/cairo-win32-display-surface.c
+++ b/src/win32/cairo-win32-display-surface.c
@@ -464,7 +464,7 @@ _cairo_win32_display_surface_map_to_image (void 
             *abstract_sur
      surface = to_win32_display_surface (surface->fallback);
  done:
      GdiFlush();
-    return _cairo_surface_map_to_image (&surface->image->base, extents);
+    return _cairo_surface_map_to_image (&surface->win32.base, extents);

  err:
      cairo_surface_destroy (surface->fallback);
@@ -499,7 +499,7 @@ _cairo_win32_display_surface_unmap_image (void 
            *abstract_surf
  	    _cairo_damage_add_rectangle (surface->fallback->damage, &r);
      }

-    return _cairo_surface_unmap_image (&surface->image->base, image);
+    return _cairo_surface_unmap_image (&surface->win32.base, image);
  }

  static cairo_status_t


How is the code supposed to look like?

Thanks,
	Hans

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert


More information about the cairo mailing list