GNOME Bugzilla – Bug 586889
solaris 10 (and earlier) Forte CC cannot compile glibmm
Last modified: 2010-09-01 19:24:12 UTC
this part of refptr.h (around line 214): template <class T_CppObject> template <class T_CastFrom> inline RefPtr<T_CppObject>::RefPtr(const RefPtr<T_CastFrom>& src) : pCppObject_ (src.operator->()) { if(pCppObject_) pCppObject_->reference(); } causes the Forte compiler to barf thus: "../../glib/glibmm/refptr.h", line 214: Error: Cannot use const Gio::File* to initialize Gio::File*. Removing the 'const' keyword results in this error instead: "../../glib/glibmm/refptr.h", line 214: Error: Could not find a match for Glib::RefPtr<Glib::T_CppObject>::RefPtr(Glib::RefPtr<Glib::RefPtr<Glib::T_CppObject>::T_CastFrom>&). Using pCppObject_ (const_cast<T_CppObject*>(src.operator->())), does allow compilation of glibmm to succeed. But then gtkmm fails to compile with: /usr/local/include/glibmm/refptr.h: In constructor 'Glib::RefPtr<T_CppObject>::RefPtr(const Glib::RefPtr<T_CastFrom>&) [with T_CastFrom = Gtk::ListStore, T_CppObject = Gtk::TreeModel]': comboboxtext.cc:35: instantiated from here /usr/local/include/glibmm/refptr.h:214: error: invalid const_cast from type 'Gtk::ListStore*' to type 'Gtk::TreeModel*'
Can you explain where the first error you mentioned was coming from? Which line was trying to instantiate the Gio::File refptr?
It's been several months without feedback, are you still unable to compile glibmm?
This looks a lot like similar problem we've had before. We have a SUN-specific macro in our convert*.m4 files that we use sometimes for this. But we need to know where this is instantiated. That means, we need to see the whole compiler error.
Closing as no further information has been provided. Please reopen if you can obtain the full compiler error. Thanks in advance.