views:

191

answers:

1

I have a dll that uses boost Asio for networking. When I link this dll to an application running on Windows 2000, a runtime exception is thrown:

"The procedure entry point freeaddrinfo could not be located in the dynamic link library WS2_32.dll"

Microsoft provides a workaround at http://msdn.microsoft.com/en-us/library/ms737931(VS.85).aspx, but that did not work for me.

Can anyone point me to a solution??

Thanks a lot,

-- Vijay

+1  A: 

Are you building your dll with the correct values set for NTDDI_VERSION and _WIN32_WINNT to target the Windows 2000? You want them set to 0x05000000 and 0x0500. Assuming you then rebuild your dll completely you should then either get a warning about the compiler not being able to find freeaddrinfo (if you haven't followed the MS workaround) or it should 'just work'.

Right now I expect you're building to target a later version of windows and the headers are allowing you to use the function which isn't present in the system dlls that are present on the system that you're trying to run on.

Len Holgate