https://bugs.winehq.org/show_bug.cgi?id=53905
Bug ID: 53905 Summary: widl: support MIDL 3.0 and WinMD output Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: UNCONFIRMED Severity: normal Priority: P2 Component: tools Assignee: wine-bugs@winehq.org Reporter: alvin@alvinhc.com
C++/WinRT (cppwinrt): https://github.com/microsoft/cppwinrt
It is currently impossible to build the custom components in the cppwinrt test suite with mingw-w64. For this to work, widl needs to:
- understand MIDL 3.0 syntax, - generate the ABI header (not required if only using C++/WinRT projection), - produce .winmd metadata of the component, - read existing system .winmd metadata (not sure if actually needed).
The MIDL command line for this:
midl.exe /metadata_dir C:\Windows\System32\WinMetadata /winrt /winmd "D:\a\cppwinrt\cppwinrt_build\x64\Debug\test_component.winmd" /h "D:\a\cppwinrt\cppwinrt_build\x64\Debug\test_component.h" /ns_prefix /nomidl test_component.idl
## MIDL 3.0
https://learn.microsoft.com/en-us/uwp/midl-3/intro
What I can tell is missing widl so far:
- MIDL 3.0 uses different basic type names (e.g. Int32, String) - Attribute types, and using custom attributes
Example file: https://github.com/microsoft/cppwinrt/blob/5ca626adae21be363399b44d2b6a9ab31...
> widl --winrt -h -H out/test_component.h --ns_prefix test_component.idl test_component.idl:5: error: syntax error, unexpected aIDENTIFIER, expecting ',' or ']'
(widl version 7.7 from mingw-w64)
## WinMD metadata
https://learn.microsoft.com/en-us/uwp/winrt-cref/winmd-files
These are CLR (think .NET and ECMA 335) assemblies used as a replacement for the old typelib files.