Skip to content

Use __declspec(dllexport) to export symbols (gtkmm-3-24 branch)

Chun-wei Fan requested to merge use-dllexport-3-24 into gtkmm-3-24

Hi,

This makes the updates to gtkmm so that we may be able to build it with Visual Studio without the need to use gendef.exe to export the symbols. Note that since glibmm-2.64.3 or later is required for this to work, we continue to use gendef.exe if the sources were generated with glibmm-2.64.2 or earlier.

This MR does the following:

  • Define a new macro GDKMM_API where it is defined appropriately during the build.
  • Re-organize how the existing GTKMM_API macro is defined.
  • Update tools/m4/class_gtkobject.m4 so that it can decorate the generated gtkmm headers with GTKMM_API (or some other decorations, as needed)
  • Mark the API and classes with GDKMM_API and GTKMM_API so that we can use them to export symbols with __declspec(dllexport), if we are using gmmproc from glibmm-2.64.3 or later.
  • Update the NMake Makefiles to check on what version of gmmproc was (or is to be) used to generate the sources/headers, and decide automatically on whether to not use gendef based on its results. As a side-effect, ignore warning C4273 as well.

With blessings, thank you!

Merge request reports