Skip to content

Commit 7c8e891

Browse files
committed
Fixing issue with windows.h being included before websocketpp.
1 parent ce1c892 commit 7c8e891

File tree

1 file changed

+7
-0
lines changed
  • Release/tests/functional/websockets/utilities

1 file changed

+7
-0
lines changed

Release/tests/functional/websockets/utilities/stdafx.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
// This header is required to define _MS_WINDOWS
3030
#include "cpprest/xxpublic.h"
3131

32+
#if defined(_MS_WINDOWS) && _MSC_VER < 1800
33+
// pplxtasks.h includes Windows.h on VS2012 only WinRT, which is terrible.
34+
// Need to include before to avoid winsock issues with websocketpp.
35+
#define NOMINMAX
36+
#include <winsock2.h>
37+
#endif
38+
3239
#include "cpprest/uri.h"
3340
#include "cpprest/asyncrt_utils.h"
3441
#include "cpprest/streams.h"

0 commit comments

Comments
 (0)