Windows 10 and VC14, fixing C2117 error when using Asio.
21 May
2016
21 May
'16
12:17 a.m.
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: if(WIN32) add_definitions(-DWINVER=0x0A00) add_definitions(-D_WIN32_WINNT=0x0A00) endif() The fix is documented at https://msdn.microsoft.com/en-us/library/6sehtctf.aspx I hope this helps others. Regards Andrew -- ___________________________________________ Andrew J. P. Maclean ___________________________________________
3095
Age (days ago)
3095
Last active (days ago)
0 comments
1 participants
participants (1)
-
Andrew Maclean