Boost logo

Boost Users :

Subject: [Boost-users] Windows 10 and VC14, fixing C2117 error when using Asio.
From: Andrew Maclean (andrew.amaclean_at_[hidden])
Date: 2016-05-20 20:17:38

If you find that when using Asio in Windows 10 with the Windows 10 SDK and
Visual Studio 2015 you get lots of C2177 errors in winnt.h and sdkdkver.h
then this should fix it:

Essentially, just add:

#define WINVER 0x0A00
#define _WIN32_WINNT 0x0A00

before any header that includes SDKDDKVer.h either directly or indirectly.

If using CMake, then in the CMakeLists.txt file just add these lines:

The fix is documented at

I hope this helps others.


Andrew J. P. Maclean

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at