Reputation: 19651
#include <winsock2.h>
This Error appers only in VC++ 2005. There is no error in 2008.
fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory
Upvotes: 0
Views: 604
Reputation: 2184
You need to install platform SDK first. Please install the Windows 7 SDK using this link.
When you are ready, open VC++ 2005, select the Options from the Tools menu, then VC++ Directories. From "Show directories for:" list you need to select "Include files". Please double click on the next item after the last one on the list and select following directory:
{SDK}\Windows\v7.1\Include
where {SDK}
is your SDK installation directory. Close the window and compile again.
Upvotes: 1
Reputation: 18411
I won't agree this would an error on any of VS versions/editions. It seems to be problem with Include Directory setting. Check it in Tools -> Options, Projects and Soltions -> VC++ Directories, and there lookup under Include Files
.
Upvotes: 0
Reputation: 596206
Check your VC++ 2005 installation to see if winsock2.h is installed. If you are using a free edition, it may not be. You may have to install a pro edition, or download a newer Platform SDK.
Upvotes: 0