Re: [xml] win32 getaddrinfo

Rob Richards wrote:
Michael Stahl wrote:
Rob Richards wrote:
I think I finally understand what you are trying to do. You are building on Win 2003 with VS 2005 and then trying to use the lib on on Win2K or lower and it is there that it is failing to link?
well, it fails to link with vs 2005 already because libxml (using 2.6.31 here) is not linked against ws2_32.dll, so ld (or whatever msft calls its equivalent) complained that getaddrinfo and freeaddrinfo are undefined symbols.
I get it now and thought that was only an issue with VS 2008. Can you try building from SVN or even a snapshot. The lib was added just after the .31 release.

ok, i have built a snapshot (downloaded friday iirc). building works, and the dll is linked against ws2_32.dll.

Can you try the following patch?
Index: wsockcompat.h
--- wsockcompat.h    (revision 3721)
+++ wsockcompat.h    (working copy)
@@ -21,6 +21,7 @@
/* Check if ws2tcpip.h is a recent version which provides getaddrinfo() */
 #if defined(GetAddrInfo)
+#include <wspiapi.h>
ah yes, that seems to work fine here, and is obviously the cleaner way to do it.
If the build from SVN fixes the initial problem, can you try using it on w Win2K machine? It's possible that the patch might not be needed though after more research I have doubts. I'm looking around here for an old OS to test on as well. I'm pretty sure I have an old VM image lying around here somewhere.

so today i finally got access to a win2k machine. the result:
with 2.6.31+my patch, the application runs.
with the snapshot, the application fails to run, and displays a message box complaining that ws2_32.dll could not be found.

so, i would suggest you revert the patch that introduced linking to ws2_32.dll, and use wspapi.h instead.


"Fifty percent of all marriages end in divorce. But look at the
 bright side: the other fifty percent end in death." -- Richard Jeni

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]