GNOME Bugzilla – Bug 155435
failed to compile gtkmm 2.2/2.4 program using gcc 3.4
Last modified: 2004-12-22 21:47:04 UTC
compile a gtkmm project (say regexxer) from source, using gcc 3.4.2. The compiler reports some casting errors, such as: (gtkmm2.4) > filebuffer.cc:799: instantiated from here > /usr/include/glibmm-2.4/glibmm/refptr.h:199: error: > invalid conversion from `const Gtk::TextMark*' to > `Gtk::TextMark*' (gtkmm2.2) > instantiated from here >/usr/include/gtkmm-2.0/glibmm/containerhandle_shared.h:205: error: cannot >convert `GdkPixbuf*' to `GObject*' for argument `1' to >`Glib::RefPtr<Glib::Object> Glib::wrap(GObject*, bool)'
Everything is fine when using gcc 3.3.4.
Compile without problems with: gcc 3.4.2 glibmm 2.4.4 gtkmm 2.5.0 bakery 2.3.8 libxml++ 2.8.0 gconfmm 2.8.0 libglademm 2.4.1 libgnomemm 2.8.0
Yeah, I also have no problem building regexxer (from cvs) with the g++ 3.4 that is in Fedora core 3: [murrayc@localhost regexxer]$ g++ --version g++ (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) Do you have another test case?
I compiled the program using the gcc 3.4 compiler with Fedora Core 3 successfully. But it still reported errors as what I reported using gcc 3.4.2 in my Gentoo box. So it seems to be the problem of tool chain in my Gentoo system. Sorry about the false alarm.
Those error messages all have something to do with type casting. Is there any gcc flag that can harden or loose this kind of check?
Closing, because it can not be reproduced on a mainstream distro.