GNOME Bugzilla – Bug 748720
Missing GTKMM_API for CellLayout
Last modified: 2015-05-06 17:40:31 UTC
Created attachment 302688 [details] Missing GTKMM_API for CellLayout This is related to bug 748719
Bug 570620 (libxml++) and bug 719847 (gtkmm) also describe problems related to the use (or lack of use) of GLIBMM_API and GTKMM_API. There are about 200 classes in glibmm. Two of them (Glib::ObjectBase and Glib::Object) are declared with GLIBMM_API. There are more than 200 classes in gtkmm. Two of them (Gtk::Object and Gtk::TreeViewColumn) are declared with GTKMM_API. Now you say that Glib::Interface needs GLIBMM_API, and that Gtk::CellLayout needs GTKMM_API. Can you or anyone else explain to someone who doesn't use gtkmm on Windows, why some classes need GLIBMM_API/GTKMM_API, but most classes don't?
Kjell, from what I understand declaring a class this way is only necessary when data are exported from DLL. From what I understand this is not the case with allMM things. Therefore as of right now the problem is the inconsistency. I did try removing such class declarations and everything compiles fine without warnings. However there is another issue that Fan brought in bug 719847. That is to ditch gendef tool to generate function export list and use __declspec(dllexport) on Win32. I agree that this is the way to go instead of gendef. However it is a major undertaking. So adding "missing" definition is the minor step towards ditching gendef in the future. And I think it is easier to mark entire class as exported rather than individual member functions even when we have no data exported.
https://git.gnome.org/browse/gtkmm/commit/?id=10fb786f2d6704192df2cb5f23b41df4012c2f7b