I'm not calling freeaddrinfo or getaddrinfo directly, but apparently
these are referenced from ATL. I've seen other threads and articles on
this problem (below), but have not been able to correct it. I've tried
#define _WIN32_WINNT 0x0500. I've tried #include <Wspiapi.h> in
atlsocket.h. No luck.
http://blogs.msdn.com/seshadripv/archive/2005/10/21/483408.aspx">http://blogs.msdn.com/seshadripv/archive/2005/10/21/483408.aspx
http://www.codeguru.com/forum/printthread.php?t=353899
http://groups.google.com/group/microsoft.public.vc.atl/browse_thread/thread/fabbe3a88b05a354/82d1e724a2fe5361?lnk=st&q=&rnum=9&hl=en#82d1e724a2fe5361
Has anyone run into this problem before? Successfully solved it? Many
thanks!
Brian
Install Microsoft Platform SDK, PSDK-x86.exe, from: Platform SDK
Install. Select Custom install and install only Build Environment (x86
32-bit) under Microsoft Windows Core SDK
In Visual Studio, click on Tools, Options. In the Options window, go to
Projects and Solutions, VC++ Directories. In the dropdown in
upper-right, select Include files. Add the Platform SDK include path
(e.g. C:\Program Files\Microsoft Platform SDK\Include) and make sure it
is the top-most entry. Similarly, select Library files and add the
Platform SDK Lib path.
Make changes to stdafx.h:
At the beginning of the file:
#define _WIN32_WINNT 0x0500
#define WINVER 0x0500
At the end of the file:
#include <WinSock2.h>
#include <Ws2tcpip.h>
#include <Wspiapi.h>
#include "WebService.h" // this line should already be there - put
other three includes before it