With Qt6 we need to target at least Windows 10
Qt6 requires at least Windows 10 and defines WINVER to this (0x0A00
) by default.
With a lower WINVER (such as 0x0600 aka. Windows Vista) we see failures.
On example with KCoreAddons on MinGW:
In file included from C:/CraftQt6Dev/mingw64/x86_64-w64-mingw32/include/windows.h:72,
from C:/CraftQt6Dev/include/QtCore/qt_windows.h:28,
from C:/_/65aa398f/kcoreaddons/src/lib/util/kprocesslist_win.cpp:20:
C:/CraftQt6Dev/mingw64/x86_64-w64-mingw32/include/winuser.h:2965:43: error: variable 'CreateSyntheticPointerDevice' definition is marked dllimport
2965 | WINUSERAPI HSYNTHETICPOINTERDEVICE WINAPI CreateSyntheticPointerDevice(POINTER_INPUT_TYPE pointerType, ULONG maxCount, POINTER_FEEDBACK_MODE mode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/CraftQt6Dev/mingw64/x86_64-w64-mingw32/include/winuser.h:2965:72: error: 'POINTER_INPUT_TYPE' was not declared in this scope
2965 | WINUSERAPI HSYNTHETICPOINTERDEVICE WINAPI CreateSyntheticPointerDevice(POINTER_INPUT_TYPE pointerType, ULONG maxCount, POINTER_FEEDBACK_MODE mode);
| ^~~~~~~~~~~~~~~~~~
C:/CraftQt6Dev/mingw64/x86_64-w64-mingw32/include/winuser.h:2965:110: error: expected primary-expression before 'maxCount'
2965 | WINUSERAPI HSYNTHETICPOINTERDEVICE WINAPI CreateSyntheticPointerDevice(POINTER_INPUT_TYPE pointerType, ULONG maxCount, POINTER_FEEDBACK_MODE mode);
| ^~~~~~~~
C:/CraftQt6Dev/mingw64/x86_64-w64-mingw32/include/winuser.h:2965:120: error: 'POINTER_FEEDBACK_MODE' was not declared in this scope
2965 | WINUSERAPI HSYNTHETICPOINTERDEVICE WINAPI CreateSyntheticPointerDevice(POINTER_INPUT_TYPE pointerType, ULONG maxCount, POINTER_FEEDBACK_MODE mode);
| ^~~~~~~~~~~~~~~~~~~~~
C:/CraftQt6Dev/mingw64/x86_64-w64-mingw32/include/winuser.h:2965:146: error: expression list treated as compound expression in initializer [-fpermissive]
2965 | WINUSERAPI HSYNTHETICPOINTERDEVICE WINAPI CreateSyntheticPointerDevice(POINTER_INPUT_TYPE pointerType, ULONG maxCount, POINTER_FEEDBACK_MODE mode);
| ^
C:/CraftQt6Dev/mingw64/x86_64-w64-mingw32/include/winuser.h:2966:93: error: 'POINTER_TYPE_INFO' does not name a type; did you mean 'POINTER_64_INT'?
2966 | WINUSERAPI WINBOOL WINAPI InjectSyntheticPointerInput(HSYNTHETICPOINTERDEVICE device, CONST POINTER_TYPE_INFO* pointerInfo, UINT32 count);
| ^~~~~~~~~~~~~~~~~
| POINTER_64_INT