microsoft / cppwinrt

C++/WinRT
MIT License
1.67k stars 239 forks source link

winrt/Windows.Foundation.h and winrt/bash.h is not compatible with clang compiler #1237

Closed benjycui closed 1 year ago

benjycui commented 1 year ago

Our project is compiled by clang, and we found that Windows.Foundation.h and bash.h is not compatible with clang.

image

sylveon commented 1 year ago

Use the NuGet package to generate the headers instead of the pre-generated files from the SDK. These should be compatible with Clang.

(note that supporting Clang is a community effort and cppwinrt's official stance still is that it's unsupported iirc)

kennykerr commented 1 year ago

Yes, the version in the Windows SDK is generally quite old and should not be used. Please use the latest version available here:

https://www.nuget.org/packages/Microsoft.Windows.cppwinrt