GNOME Bugzilla – Bug 343997
gtkmm printcontext does not build
Last modified: 2006-06-19 18:05:22 UTC
gtkmm 2.9.3 does not build, this is the error: printcontext.cc: In member function 'Cairo::RefPtr<Cairo::Context> Gtk::PrintContext::get_cairo()': printcontext.cc:132: error: 'gtk_print_context_get_cairo' was not declared in this scope printcontext.cc: In member function 'Glib::RefPtr<Pango::FontMap> Gtk::PrintContext::get_fontmap()': printcontext.cc:182: error: 'gtk_print_context_get_fontmap' was not declared in this scope printcontext.cc: In member function 'Glib::RefPtr<Pango::Context> Gtk::PrintContext::create_context()': printcontext.cc:197: error: 'gtk_print_context_create_context' was not declared in this scope printcontext.cc: In member function 'Glib::RefPtr<Pango::Layout> Gtk::PrintContext::create_layout()': printcontext.cc:207: error: 'gtk_print_context_create_layout' was not This is with gtk+ 2.9.2, cairomm 0.6.0 and cairo 1.1.6 on Mandriva Cooker.
Yes, gtk+ 2.9 changed some API (which is OK). It's fixed in CVS, and will be fixed by a new gtkmm tarball today. Thanks for the feedback.
It doesn't build in gtkmm 2.9.4 against gtk+ 2.9.3: make[1]: Entering directory `/tmp/BUILD/gtkmm-2.9.4/gtk/gtkmm' if /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"gtkmm\" -I../../gtk -I../../gtk -I../../pango -I../../pango -I../../atk -I../../atk -I../../gdk -I../../gdk -I../../gtk -I../../gtk -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/cairomm-1.0 -I/usr/include/cairo -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/gtk-unix-print-2.0 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fomit-frame-pointer -march=i586 -mtune=pentiumpro -fasynchronous-unwind-tables -Wall -MT printoperation.lo -MD -MP -MF ".deps/printoperation.Tpo" -c -o printoperation.lo printoperation.cc; \ then mv -f ".deps/printoperation.Tpo" ".deps/printoperation.Plo"; else rm -f ".deps/printoperation.Tpo"; exit 1; fi g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"gtkmm\" -I../../gtk -I../../gtk -I../../pango -I../../pango -I../../atk -I../../atk -I../../gdk -I../../gdk -I../../gtk -I../../gtk -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/cairomm-1.0 -I/usr/include/cairo -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/gtk-unix-print-2.0 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fomit-frame-pointer -march=i586 -mtune=pentiumpro -fasynchronous-unwind-tables -Wall -MT printoperation.lo -MD -MP -MF .deps/printoperation.Tpo -c printoperation.cc -fPIC -DPIC -o .libs/printoperation.o printoperation.cc: In member function 'void Gtk::PrintOperation::set_show_dialog(bool)': printoperation.cc:735: error: 'gtk_print_operation_set_show_dialog' was not declared in this scope printoperation.cc: In member function 'void Gtk::PrintOperation::set_pdf_target(const std::string&)': printoperation.cc:740: error: 'gtk_print_operation_set_pdf_target' was not declared in this scope printoperation.cc: In member function 'Gtk::PrintOperationResult Gtk::PrintOperation::run(Gtk::Window&)': printoperation.cc:755: error: cannot convert 'GtkWindow*' to 'GtkPrintOperationAction' for argument '2' to 'GtkPrintOperationResult gtk_print_operation_run(GtkPrintOperation*, GtkPrintOperationAction, GtkWindow*, GError**)' printoperation.cc: In member function 'void Gtk::PrintOperation::run_async(Gtk::Window&)': printoperation.cc:790: error: 'gtk_print_operation_run_async' was not declared in this scope
Hmm, OK, it's difficult to catch the moment when GTK+ do a release. I'm not likely to release a new tarball to fix this because cvs HEAD of GTK+ and gtkmm has already moved on. Maybe we'll have better luck for the next GTK+ tarball. In the meantime, you could try CVS with jhbuild.
This is again due to recent API (function name) changes in GTK+.
Hopefully we'll have more luck with 2.9.5 (released just now), though I haven't tested it against a tarball yet. I'd appareciate it if you could.
I can confirm that 2.9.5 is building fine against the current gtk release.