Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.UI.Interop.h causes -Wmissing-field-initializers when using ClangCL #9771

Open
dlech opened this issue Jun 27, 2024 · 0 comments
Open
Labels
area-Tooling team-CompInput Issue for IXP (Composition, Input) team

Comments

@dlech
Copy link

dlech commented Jun 27, 2024

Describe the bug

C:\Users\david\Documents\GitHub\pywinrt\projection\..\_tools\Microsoft.WindowsAppSDK\include\winrt/Microsoft.UI.Interop.h 
(42,52): error : missing field 'pfnGetWindowFromWindowId' initializer [-Werror,-Wmissing-field-initializers] [C:\Users\da 
vid\Documents\GitHub\pywinrt\_build\clang-cl\_winrt_microsoft_ui_interop.vcxproj]

Steps to reproduce the bug

Build a project that has #include Microsoft.UI.Interop.h> and compile it using clang-cl.

Expected behavior

Project should compile without error.

Screenshots

No response

NuGet package version

Windows App SDK 1.5.4: 1.5.240607001

Packaging type

No response

Windows version

No response

IDE

Other

Additional context

The problem is this line:

__declspec(selectany) InteropImpl s_impl { nullptr };

It should be:

__declspec(selectany) InteropImpl s_impl { };

because the struct has multiple fields.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jun 27, 2024
@codendone codendone transferred this issue from microsoft/WindowsAppSDK Jun 27, 2024
@codendone codendone added area-Tooling team-CompInput Issue for IXP (Composition, Input) team and removed needs-triage Issue needs to be triaged by the area owners labels Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Tooling team-CompInput Issue for IXP (Composition, Input) team
Projects
None yet
Development

No branches or pull requests

2 participants