Is there a way to build Windows Store applications with the Mingw toolchain? (And ultimately cross compile them from mingw on Linux, since if it works in one Mingw toolchain it should work in another.)
I guess one requirement is to stick to the API:s allowed in the Windows Store app sandbox, but what other things are there to consider before distribution to the store? XAML? 32 or 64 bit code?
Since Mingw C++ is not link compatible with MSVC++, I assume plain C programs without WRL would be the easiest way to achieve this?
MinGW-w64 has experimental support of UWP C runtime distributed with VS2013. C dlls linked with universal VS2013 crt are also can be used with VS2015 and VS2017 UWP toolchains ( UWP project should has "Microsoft Visual C++ 2013 Runtime Package for Windows Universal" as dependency).
MinGW-w64 provides winstorecompat
library to replace some forbidden API calls on UWP platform with user defined implementation. winstorecompat
should be linked to user's library before linking with system libraries.
Also it's required to build MinGW C dll with custom flag -Wl,--dynamicbase
to pass Windows 10 Store Certification Kit security checks and also set appcontainer
bit flag to be compatible with Windows 10 Store binary requriements.
Here it's link to sample project I've worked on how to consume plain C MinGW Dll into Windows 10 C# UWP application, PInvoke methods from C dll and pass Certification Kit security checks to be published in Windows Store. I've referenced libVLC WinRT build implementation.