title: Build Qt project with MinGW to use WinRT APIs
body: <p>I would like to use libraries available via WinRT API (like <a href="https://docs.microsoft.com/en-us/uwp/api/" rel="noreferrer">these</a>) from my application created using Qt 5.9.2 MinGW 32bit. I got Windows 10 OS.</p>
  
  <p>Now, I have set up a kit as presented below.</p>
  
  <p><a href="https://i.stack.imgur.com/gxU74.png" rel="noreferrer"><img src="https://i.stack.imgur.com/gxU74.png" alt="MinGW Kit Setup"></a></p>
  
  <p>Then, in <code>.pro</code> file, I have added:</p>
  
  <pre><code>CONFIG += c++1z
  
  SOURCES += main.cpp
  
   ### Windows 10 SDK
  
   win32:CONFIG(release, debug|release): LIBS += -L$$PWD/'../../../../Program Files (x86)/Windows Kits/10/Lib/10.0.16299.0/um/x86/' -lWindowsApp
   else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/'../../../../Program Files (x86)/Windows Kits/10/Lib/10.0.16299.0/um/x86/' -lWindowsApp
  
   INCLUDEPATH += $$PWD/'../../../../Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/shared'
   DEPENDPATH += $$PWD/'../../../../Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/shared'
   INCLUDEPATH += $$PWD/'../../../../Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/um'
   DEPENDPATH += $$PWD/'../../../../Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/um'
   INCLUDEPATH += $$PWD/'../../../../Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/ucrt'
   DEPENDPATH += $$PWD/'../../../../Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/ucrt'
   INCLUDEPATH += $$PWD/'../../../../Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.12.25827/include'
   DEPENDPATH += $$PWD/'../../../../Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.12.25827/include'
   INCLUDEPATH += $$PWD/../ne-patient-app-libraries/cppwinrt/10.0.16299.0/
   DEPENDPATH += $$PWD/../ne-patient-app-libraries/cppwinrt/10.0.16299.0/
  </code></pre>
  
  <p>I got <code>cppwinrt</code> from <a href="https://github.com/Microsoft/cppwinrt" rel="noreferrer">GitHub rep</a> and Windows 10 SDK from <a href="https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk" rel="noreferrer">Windows Dev Center</a>.</p>
  
  <p>I just added some lines in <code>main.cpp</code> to test proper compilation:</p>
  
  <pre><code>#include &lt;QCoreApplication&gt;
  #include &lt;winrt/Windows.Devices.WiFi.h&gt;
  
  int main(int argc, char *argv[])
  {
      QCoreApplication a(argc, argv);
  
      WiFiAdapter wiFiAdapter;
  
      return a.exec();
  }
  </code></pre>
  
  <p>After running <code>qmake</code> and <code>build</code>, I am getting these errors:</p>
  
  <blockquote>
    <p>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt\corecrt_stdio_config.h:31: error: #error Unsupported architecture
             #error Unsupported architecture
              ^</p>
    
    <p>C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.12.25827\include\new:23: error: #error Unsupported architecture
       #error Unsupported architecture
        ^</p>
    
    <p>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winnt.h:1008: error: #error Must define a target architecture.
     #error Must define a target architecture.
      ^</p>
  </blockquote>
  
  <p>... and others from files: <code>corecrt_stdio_config.h</code>, <code>winnt.h</code>, <code>oaidl.h</code>, <code>DirectXMath.h</code>, <code>vcruntime.h</code> and <code>yvals.h</code>.</p>
  
  <p>This is the detailed build command run by the compiler:</p>
  
  <pre><code>g++ -c -fno-keep-inline-dllexport -g -std=gnu++1z -Wextra -Wall -W -fexceptions -mthreads -DUNICODE -D_UNICODE -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_CORE_LIB -I../uwp-test -I. -I"../../../../Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/shared" -I"../../../../Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/um" -I"../../../../Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/ucrt" -I"../../../../Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.12.25827/include" -I../ne-patient-app-libraries/cppwinrt/10.0.16299.0 -I../../../../Qt/5.9.2/mingw53_32/include -I../../../../Qt/5.9.2/mingw53_32/include/QtCore -Idebug -I../../../../Qt/5.9.2/mingw53_32/mkspecs/win32-g++  -o debug/main.o ../uwp-test/main.cpp
  </code></pre>
  
  <p>What am I missing? What could solve the problem? Thank you!</p>