"DllMain" function in static libraries (mingw32-glib2-static)

Erik van Pienbroek erik at vanpienbroek.nl
Sat Mar 23 10:55:17 UTC 2013


Gavin Smith schreef op za 23-03-2013 om 09:04 [+0000]:

> $ nm /usr/i686-w64-mingw32/sys-root/mingw/lib/libglib-2.0.a | grep
> DllMain
> 00000240 T _DllMain at 12

> 
> I heard that DllMain symbols should not appear in static libraries
> because they do not get called and if more than library does it they
> conflict. Both glib and libgsf libraries do this, however. (This
> problem appears both when I compile libgsf from source and when I use
> the Fedora MinGW libgsf package.)

You're correct that DllMain should only appear in shared libraries. If
they appear in static libraries then this can be considered a bug which
should be resolved.

I can fix the glib case, but for libgsf please file a bug at
http://redhat.bugzilla.com against the mingw-libgsf component so that
its package maintainer can fix it.

Regards,

Erik van Pienbroek




More information about the mingw mailing list