2

I have a program I compiled on a Windows 7 box with Visual Studio 2012 Update 3. I selected the "Visual Studio 2012 - Windows XP (v110_xp)" platform toolset when I built it. However, when I try to run the binary on a Windows XP SP3 box, I get the following error:

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

Now, I'm pretty sure I know what this error means: it means the DLL loader could not find the inet_ntop() function in the WS2_32.DLL thats on the WinXP box. Knowing that this would only treat a symptom of the problem and not the source, I copied the WS2_32.DLL from the Win7 box into the same directory that I have the EXE on the WinXP box. I got passed that error, only to have it replaced with a similar error but this time referring to a function found in MSVCRT.DLL.

Oddly, copying the MSVCRT.DLL from the Win7 box to the WinXP box didn't get me pass the error this time.

Does anybody know what I need to do get the binary to work on WinXP? If it came down to it, I'll setup a WinXP development environment in a virtual machine and just do builds from there. That's a lot of work at this point, so I'd rather just keep doing builds on my Win7 box.

Thanks!

  • I suspect [this](http://www.microsoft.com/en-us/download/details.aspx?id=30679) is what you're missing. – Joachim Isaksson Aug 05 '13 at 20:29
  • Hmm ... I installed *a* vcredist for 2012 onto the WinXP box this morning. But looking at your link it says "for Visual Studio 2012 Update 3" and I don't recall the copy of vcredist I downloaded said "Update 3" on it. So that might be my problem. I'm typing up this response from home now, so I'll try this first thing tomorrow at work and will report back. Thanks! – Arcadio Alivio Sincero Aug 05 '13 at 22:47

1 Answers1

1

According to MSDN inet_ntop() is only available for Windows Vista and later.

If you only need to work with IPv4, you could use inet_ntoa(), or failing that, you can use the Winsock functions WSAAddressToString() and WSAStringToAddress() as it mentions in the Remarks section of the inet_ntoa() documentation:

Screenshot

Roger Rowland
  • 25,885
  • 11
  • 72
  • 113