GNOME Bugzilla – Bug 560074
example doesn't build with cairomm 1.7.0
Last modified: 2011-01-16 23:37:02 UTC
This is on Mandriva Cooker, goocanvasmm 0.12.0 does't build: g++ -DHAVE_CONFIG_H -I. -I. -I../../goocanvas -I../../goocanvas -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtkmm-2.4 -I/usr/lib/gtkmm-2.4/include -I/usr/include/giomm-2.4 -I/usr/lib/giomm-2.4/include -I/usr/include/gdkmm-2.4 -I/usr/lib/gdkmm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/include/atkmm-1.6 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairomm-1.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/atk-1.0 -I/usr/include/goocanvas-1.0 -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -MT primitives.o -MD -MP -MF .deps/primitives.Tpo -c -o primitives.o primitives.cc primitives.cc: In member function 'Glib::RefPtr<Goocanvas::Item> Primitives::_create_anchor(double, double)': primitives.cc:357: error: braces around initializer for non-aggregate type 'Cairo::Matrix' make: *** [primitives.o] Error 1
Jonathan, I have CCed you just because you probably want to be aware of this small API problem. It should be easy to fix.
yes, hm. So we have our first report of breakage from changing the cairomm API from typedef cairo_matrix_t Matrix; to class Matrix : public cairo_matrix_t { ... }; To be fair, the example here really should have been using cairo_matrix_t directly since they were using it in a g_object_set() for a property of type cairo_matrix_t, but it does show the kind of things that will break due to this change in cairomm. So I guess we need to decide whether this is acceptable or whether we need to revert the cairomm change.
Yeah, I don't think it's a big problem. Small API changes are OKish. You just need to be aware of it.
Created attachment 122972 [details] [review] build fix for building goocanvasmm against cairomm 1.7+ Simply change the demo to use cairo_matrix_t directly to fix the build breakage for now.
Feel free to commit that, though I would like to see it use the new C++ API, using an ifdef if necessary.
committed as-is for now. r1804