microsoft / DirectXTK

The DirectX Tool Kit (aka DirectXTK) is a collection of helper classes for writing DirectX 11.x code in C++
https://walbourn.github.io/directxtk/
MIT License
2.55k stars 506 forks source link

Clarify required WinSDK version #389

Closed Pospelove closed 1 year ago

Pospelove commented 1 year ago

readme says: "Use of the Windows 10 May 2020 Update SDK (19041) or later is required for Visual Studio"

but users are not able to install directxtk via vcpkg before updating to the latest version available (see https://github.com/microsoft/vcpkg/issues/31737) profile P.S. maybe worth including winsdk ver check into the portfile itself

kkEngine commented 1 year ago

When trying to build via vcpkg on Win 10 sdk (10.0.20348.0), errors occured only in the file "C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt\wrl\event.h"

walbourn commented 1 year ago

The failure here is due to the combination of using the "19.36.32532.0" (i.e. Visual Studio 2022 17.6) compiler with the older Windows SDK. In recent versions of DirectX Tool Kit, I enabled some additional conformance switches when using the new complier. It appears that /Zc:templateScope is not compatible with older Windows SDKs. I'll look at updating the CMakeLists to not use that switch with SDKs prior to 22000.