GNOME Bugzilla – Bug 603527
programs linked against glib-2.22 won't run on MS Windows 2000
Last modified: 2010-02-13 16:43:15 UTC
In GLib 2.22.X, gwin32resolver.c, the function free_lookup_by_name calls freeaddrinfo(). The MS header ws2tcpip.h is included indirectly, but this is not going to work on Windows 2000 unless wspiapi.h is also included, both as an empirical matter and according to MSDN (google: msdn freeaddrinfo). Apps linked to GLib 2.22 fail at startup with the error message, "The procedure entry point freeaddrinfo could not be found in ws2_32.dll" The required header, wspiapi.h, could be included conditionally, but it is not part of mingw.
*** Bug 604458 has been marked as a duplicate of this bug. ***
The mingw-w64 "fork" of mingw (which despite its name does provide toolchains producing both 32- and 64-bit code) does have a wspiapi.h. If GLib is compiled with mingw-w64, then wspiapi.h could be included. I think I will do that. I won't go into doubts about the provenance of mingw-w64's wspiapi.h here.
OK, fixed now as well as it can be; i.e. if there is <wspiapi.h> when building GLib, it is used.
*** Bug 607726 has been marked as a duplicate of this bug. ***
It might be helpful if the GTK for Windows page at www.gtk.org either (a) offered a build of current GLib that uses <wspiapi.h>, or (b) offered an alternate link to glib-2.21.N marked "Use this if you want to support Windows 2000".
*** Bug 609329 has been marked as a duplicate of this bug. ***