winsock and x64 target

Subbu picture Subbu · Apr 1, 2011 · Viewed 19.4k times · Source

I am trying to build a C based application in 64 bit using the x64 target in the configuration manager in visual studio 2008.

However, I am using sockets and my program includes winsock.h and winsock32.lib in the library section of the project properties?

What is the equivalent for 64 bit? I do not want to run as 32 bit but as a pure 64 bit application.

Thanks for any help in advance.

Subbu

Answer

Carl Norum picture Carl Norum · Apr 1, 2011

Microsoft doesn't name some of these libraries very well, I'm afraid. As long as you link against the 64-bit version of winsock32.lib you should be fine. Here's an MSDN link with a similar problem and more information.