Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-98498

Qt does not compile with WinSDK 10.0.17763.0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 6.2.1
    • Fix Version/s: None
    • Component/s: Build System
    • Labels:
      None
    • Environment:
      MSVC 19.29, Windows 10 SDK 10.0.17763.0
    • Platform/s:
      Windows

      Description

      We are targeting Windows 10 LTSC 2019 (WinSDK 10.0.17763.0), with some of our applications, and are trying to compile Qt for this platform following the instructions here: https://doc.qt.io/qt-6/windows-building.html

      That fails with errors like this:

      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\oaidl.h(487): error C2059: syntax error: '/'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\oaidl.h(502): error C2059: syntax error: '/'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\oaidl.h(530): error C2059: syntax error: '}'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\oaidl.h(531): error C2059: syntax error: '}'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\oaidl.h(533): error C2059: syntax error: '}'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\oaidl.h(534): error C2059: syntax error: '}'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\oaidl.h(665): error C2079: 'varDefaultValue' uses undefined struct 'tagVARIANT'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\oaidl.h(950): error C2079: 'varValue' uses undefined struct 'tagVARIANT'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\propidlbase.h(319): error C2059: syntax error: '/'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\propidlbase.h(378): error C2371: 'pvarVal': redefinition; different basic types
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\oaidl.h(510): note: see declaration of 'pvarVal'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\propidlbase.h(379): error C2059: syntax error: '}'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\propidlbase.h(380): error C2059: syntax error: '}'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\propidlbase.h(383): error C2059: syntax error: '}'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\propidlbase.h(384): error C2059: syntax error: '}'
      

      (This particular error comes from qtbase\src\3rdparty\pcre2\src\pcre2_jit_compile.c, but when building with a separately installed PCRE, I have also observed this error somewhere in qtimageformats.)

      I think these errors are caused by these WinSDK headers not being fully /permissive--clean (the cause of this error is this macro: #define _VARIANT_BOOL /##/).

      So the question is, what can we do about this?

      We could build Qt with a newer WinSDK (or use a precompiled version that was built with a newer WinSDK) and hope it doesn't actually use any of the newer functionality so that it will still run on Windows 10 1809, but that approach doesn't exactly inspire confidence...

       

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            qtbuildsystem Qt Build System Team
            Reporter:
            snrwk Leon Scharnowski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes