0

After migrating a project from Visual C++ to Visual Studio 2013 I receive the following error on building the project:

C1189:#error: MFC requires use of Winsock2.h

In stdafx.h I've included the following headers:

#include <afxwin.h> 
#include <afxext.h>
#include <afxdtctl.h>
#include <afxcmn.h>
#include <afxsock.h>
#include <WinSock2.h>

I've tried to change the order of the include files ( winsock before and after MFC headers ) but still the same errors.

Can anyone give me some ideas to solve this issues ? Thank you !

Madalin
  • 129
  • 15

1 Answers1

3

Solved ! One of the .cpp files from Extern dependencies was including <winsock.h>. I've removed the include line and the problem was solved. Thank you !

IInspectable
  • 46,945
  • 8
  • 85
  • 181
Madalin
  • 129
  • 15