microsoft / DirectXTK12

The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
https://walbourn.github.io/directx-tool-kit-for-directx-12/
MIT License
1.47k stars 393 forks source link

Use /permissive- for VS 2017 desktop projects #39

Closed walbourn closed 5 years ago

walbourn commented 6 years ago

There is a known issue with the Windows 10 SDK (17134) or earlier when using VS 2017 (15.8 update) and /permissive-. This is fix in a future version of the Windows 10 SDK, so for now I've disabled the usage in this commit

walbourn commented 5 years ago

Workaround remove when upgraded to the Windows 10 SDK (17763) in this commit

oliver27b commented 4 years ago

hey. i wasn't sure the best way to contact you; this revolves around maintenance for desktop projects. i was following the tutorial https://github.com/microsoft/DirectXTK12/wiki/Adding-the-DirectX-Tool-Kit using VS2019 with 10.0.18362.0 and was having problems; NuGet kinda blew up. so i followed the project to project references and it worked. when i started adding headers, some worked, others caused the build to come up with tons of errors. after prodding around a while, i found that if i added

include "dxgi.h" to my pch.h, everything was happy :) so the tutorial page above if you could let people know they need dxgi.h for some reason (maybe it's supposed to be a header in another file?). anyways i'm kinda new at this so excuse me if this is useless information. thanks

walbourn commented 4 years ago

@oliver27b - Thanks for the report. It inspired me to add an explicit test to my test suite to validate that all my public headers were including all their dependencies and were 'warnings clean'.

I was indeed missing a includes of DXGI headers in a few cases--all my previous tests, samples, and my tutorial templates include DXGI headers in the pch.h so hadn't noticed the issue before.

See this commit for the details of the fix.