static library compilation fails on windows
Submitted by kka..@..il.com
Link to original bug (#793086)
Description
Created attachment 367740 patch of required changes
This is a patch to fix static builds for windows and the appropriate changes to the meson build tool.
This includes: Moving initialization functions inside glib_init() so that they are properly called during static initialization. It is critical that they be added to glib_init() as the gobject ctors function only calls glib_init() and so in a static build where order of initialization might not deterministic putting these outside glib_init() may result in glib_init() being called before windows threading is initialized leading to segfaults. See https://bugzilla.gnome.org/show_bug.cgi?id=756139 Fixing #if's so that during static compilation extraneous DllMain symbols are not exported which would prevent linking. Fixing up meson.build's to set proper defines for subprojects when building statically.
Forgive my patch file if it was incorrectly created. I havn't created one before for submission with a bug report. I diff'ed between my changes and a clean copy of the tarball.
Patch 367740, "patch of required changes":
glib_static_win.patch
Version: 2.55.x