glibmm should not rely on gendef on Windows with MSVC but use __declspec(dllexport) instead
Submitted by Mikhail Titov
Link to original bug (#749091)
Description
Created attachment 303059 Missing GLIBMM_API & GIOMM_API for MSVC
This is an umbrella bug to track removal of gendef and use of conditional macros GLIBMM_API and GIOMM_API instead for importing/exporting symbols from DLLs on Windows when building with MSVC.
It was mentioned in bug 719847, bug 748719 and alike that there is a mixture of import/export macros but gendef is still used. However it would be really nice to build glibmm and the rest the same way as, e.g., libsigc++, i.e. without gendef.
I'm attaching a patch that adds missing definitions. It should not cause a havoc on other platforms, but I'd appreciate the feedback. I tested the build on Windows with msys2/mingw32/gcc 4.9.2 and MS VC++ 2012 using CMake. The latter is unofficial and details can be found at https://github.com/mlt/gtkmm . It is not a final solution and shall not break existing build infrastructure. Some things still might be missing. However gtkmm demo and gstreamermm demo compiles and runs fine. Traces of gendef have not been removed.
Patch 303059, "Missing GLIBMM_API & GIOMM_API for MSVC":
0001-Massive-GLIBMM_API-and-GIOMM_API-definitions.patch