Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Windows.h errors when including QtGui but not QtCore



  • I am getting the following error when including QtGui. Including QtCore works just fine:

    Microsoft (R) Program Maintenance Utility Version 14.27.29112.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
            cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W0 -EHsc -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DPYQTDEPLOY_OPTIMIZED -DPK_DEBUG_BUILD=0 -DXML_STATIC -DMS_WINDOWS -D_WIN32_WINNT=Py_WINVER -DNTDDI_VERSION=Py_NTDDI -DWINVER=Py_WINVER -DNDEBUG -DQT_NO_DEBUG -DQT_QUICKWIDGETS_LIB -DQT_QUICK_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I..\..\vendor\sysroot-win-64\include -I..\..\vendor\sysroot-win-64\include\python3.7 -I..\..\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_blake2 -I..\..\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_ctypes -I..\..\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_ctypes\libffi_msvc -I..\..\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_sha3 -I..\..\vendor\sysroot-win-64\src\Python-3.7.8\Modules\expat -I..\..\pkdiagram\vedana\build -I..\..\..\Qt\5.15.1\msvc2019_64\include -I..\..\..\Qt\5.15.1\msvc2019_64\include\QtQuickWidgets -I..\..\..\Qt\5.15.1\msvc2019_64\include\QtQuick -I..\..\..\Qt\5.15.1\msvc2019_64\include\QtPrintSupport -I..\..\..\Qt\5.15.1\msvc2019_64\include\QtWidgets -I..\..\..\Qt\5.15.1\msvc2019_64\include\QtGui -I..\..\..\Qt\5.15.1\msvc2019_64\include\QtANGLE -I..\..\..\Qt\5.15.1\msvc2019_64\include\QtQmlModels -I..\..\..\Qt\5.15.1\msvc2019_64\include\QtQml -I..\..\..\Qt\5.15.1\msvc2019_64\include\QtNetwork -I..\..\..\Qt\5.15.1\msvc2019_64\include\QtCore -Irelease -I/include -I..\..\..\Qt\5.15.1\msvc2019_64\mkspecs\win32-msvc  -Forelease\ @C:\Users\patrick\AppData\Local\Temp\nm83FA.tmp
    _pkdiagram.cpp
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\winuser.h(4383): error C2061: syntax error: identifier 'LPWNDCLASSEXA'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\winuser.h(4391): error C2061: syntax error: identifier 'LPWNDCLASSEXW'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\prsht.h(609): error C3646: 'hdr': unknown override specifier
    C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\prsht.h(609): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    

    Here is the qmake file that produced the error:

    # Generated for win-64 and Python v3.7.8.
    
    TEMPLATE = app
    
    QT += quickwidgets printsupport gui network qml widgets quick
    CONFIG += warn_off
    
    RESOURCES = \
        resources/pyqtdeploy.qrc
    
    DEFINES += PYQTDEPLOY_OPTIMIZED
    DEFINES += PK_DEBUG_BUILD=0
    DEFINES += XML_STATIC
    
    INCLUDEPATH += C:\familydiagram\vendor\sysroot-win-64\include
    INCLUDEPATH += C:\familydiagram\vendor\sysroot-win-64\include\python3.7
    INCLUDEPATH += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_blake2
    INCLUDEPATH += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_ctypes
    INCLUDEPATH += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_ctypes/libffi_msvc
    INCLUDEPATH += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_sha3
    INCLUDEPATH += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\expat
    
    SOURCES = pyqtdeploy_main.cpp pyqtdeploy_start.cpp pdytools_module.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/_pkdiagram/_pkdiagram.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/_pkdiagram/_pkdiagram_win32.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/_pkdiagram/build/_pkdiagram/release/moc__pkdiagram.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/_pkdiagram/build/_pkdiagram/release/moc_unsafearea.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/_pkdiagram/build/_pkdiagram/sip_pkdiagramAppFilter.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/_pkdiagram/build/_pkdiagram/sip_pkdiagramCUtil.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/_pkdiagram/build/_pkdiagram/sip_pkdiagramFDDocument.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/_pkdiagram/build/_pkdiagram/sip_pkdiagramPathItemBase.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/_pkdiagram/build/_pkdiagram/sip_pkdiagramPathItemDelegate.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/_pkdiagram/build/_pkdiagram/sip_pkdiagramPersonDelegate.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/_pkdiagram/build/_pkdiagram/sip_pkdiagramQMap0100QString0100QString.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/_pkdiagram/build/_pkdiagram/sip_pkdiagramcmodule.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/_pkdiagram/unsafearea.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/vedana/_vedana.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/vedana/build/_vedana/release/moc_qaesencryption.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/vedana/build/_vedana/sip_vedanacmodule.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/vedana/encryption.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\../../../pkdiagram/vedana/qaesencryption.cpp
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_abc.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_bisectmodule.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_blake2/blake2b_impl.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_blake2/blake2module.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_blake2/blake2s_impl.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_contextvarsmodule.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_ctypes/_ctypes.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_ctypes/callbacks.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_ctypes/callproc.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_ctypes/cfield.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_ctypes/libffi_msvc/ffi.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_ctypes/libffi_msvc/prep_cif.c
    MASMSOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_ctypes/libffi_msvc/win64.asm
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_ctypes/malloc_closure.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_ctypes/stgdict.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_datetimemodule.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_hashopenssl.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_heapqmodule.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_json.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_lsprof.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_math.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_opcode.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_pickle.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_queuemodule.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_randommodule.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_sha3/sha3module.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_ssl.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_struct.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\_winapi.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\binascii.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\expat/xmlparse.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\expat/xmlrole.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\expat/xmltok.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\mathmodule.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\pyexpat.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\rotatingtree.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\selectmodule.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\socketmodule.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\unicodedata.c
    SOURCES += C:\familydiagram\vendor\sysroot-win-64\src\Python-3.7.8\Modules\zlibmodule.c
    
    HEADERS = pyqtdeploy_version.h frozen_bootstrap.h frozen_bootstrap_external.h
    
    LIBS += -LC:\familydiagram\vendor\sysroot-win-64\lib
    LIBS += -LC:\familydiagram\vendor\sysroot-win-64\lib\python3.7\site-packages\PyQt5
    LIBS += -lQtCore
    LIBS += -lQtGui
    LIBS += -lQtNetwork
    LIBS += -lQtPrintSupport
    LIBS += -lQtQml
    LIBS += -lQtQuick
    LIBS += -lQtQuickWidgets
    LIBS += -lQtWidgets
    LIBS += -llibcrypto
    LIBS += -llibssl
    LIBS += -lpython37
    LIBS += -lsip
    LIBS += -lzlib
    
    cython.name = Cython compiler
    cython.input = CYTHONSOURCES
    cython.output = ${QMAKE_FILE_BASE}.c
    cython.variable_out = GENERATED_SOURCES
    cython.commands = cython ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
    
    QMAKE_EXTRA_COMPILERS += cython
    
    linux-* {
        LIBS += -lutil -ldl
    }
    
    win32 {
        masm.input = MASMSOURCES
        masm.output = ${QMAKE_FILE_BASE}.obj
    
        contains(QMAKE_TARGET.arch, x86_64) {
            masm.name = MASM64 compiler
            masm.commands = ml64 /Fo ${QMAKE_FILE_OUT} /c ${QMAKE_FILE_IN}
        } else {
            masm.name = MASM compiler
            masm.commands = ml /Fo ${QMAKE_FILE_OUT} /c ${QMAKE_FILE_IN}
        }
    
        QMAKE_EXTRA_COMPILERS += masm
    
        LIBS += -lshlwapi -ladvapi32 -lshell32 -luser32 -lws2_32 -lole32 -loleaut32 -lversion
        DEFINES += MS_WINDOWS _WIN32_WINNT=Py_WINVER NTDDI_VERSION=Py_NTDDI WINVER=Py_WINVER
    
        # This is added from the qmake spec files but clashes with _pickle.c.
        DEFINES -= UNICODE
    }
    
    macx {
        LIBS += -framework SystemConfiguration -framework CoreFoundation
    }
    
    _PKDIAGRAM = $$PWD/../../pkdiagram/_pkdiagram
    VEDANA = $$PWD/../../pkdiagram/vedana
    
    # HEADERS += $$_PKDIAGRAM/_pkdiagram.h
    
    INCLUDEPATH += $$VEDANA/build
    
    PK_ENTITLEMENTS.name = CODE_SIGN_ENTITLEMENTS
    PK_ENTITLEMENTS.value = Family Diagram.entitlements
    QMAKE_MAC_XCODE_SETTINGS += PK_ENTITLEMENTS
    
    QMAKE_INFO_PLIST = Info.plist
    ICON = PKDiagram-Filled.icns
    
    !win32 {
        debug {
            QMAKE_CFLAGS += -DPK_DEBUG_BUILD=1
            QMAKE_CXXFLAGS += -DPK_DEBUG_BUILD=1
        }
        release {
            # QMAKE_CFLAGS += -DPK_DEBUG_BUILD=0
            # QMAKE_CXXFLAGS += -DPK_DEBUG_BUILD=0
        }
    }
    
    beta {
    	QMAKE_CFLAGS += -DPK_BETA_BUILD=1
    	QMAKE_CXXFLAGS += -DPK_BETA_BUILD=1
    }
    
    alpha {
    	QMAKE_CFLAGS += -DPK_ALPHA_BUILD=1
    	QMAKE_CXXFLAGS += -DPK_ALPHA_BUILD=1
    }
    
    mac {
    	RESOURCES += ../../resources/pkdiagram.qrc ../../resources/qml/qml.qrc
    }
    
    macx {
    
    	alpha|beta|release {
    		# Sparkle
    		sparkle.files = Vendor/Sparkle.framework
    		sparkle.path = Contents/Frameworks
    		QMAKE_BUNDLE_DATA += sparkle
    		QMAKE_CXXFLAGS += -F$$PWD -DPK_USE_SPARKLE=1
    		QMAKE_LFLAGS += -rpath @executable_path/../Frameworks -F$$PWD
    		LIBS += -L$$PWD -framework Sparkle
    
    		# AppCenter
    		LIBS += -FVendor -framework AppCenter -framework AppCenterAnalytics -framework AppCenterCrashes
    		QMAKE_CFLAGS += -fmodules -fcxx-modules -DPK_USE_APPCENTER=1
    		QMAKE_CXXFLAGS += -Werror -fmodules -fcxx-modules -DPK_USE_APPCENTER=1
    	}
    
    	## Bundle Resources
    	QMAKE_INFO_PLIST = Info.plist
    	ICON = PKDiagram-Filled.icns
    	app_icon.files = PKDiagram-Filled.icns
    	app_icon.path = Contents/Resources
    	QMAKE_BUNDLE_DATA += app_icon
    	doc_icon.files = PKDiagram-Document.icns
    	doc_icon.path = Contents/Resources
    	QMAKE_BUNDLE_DATA += doc_icon
    
    	# User Manual
    	usermanual.files = ../../doc/User-Manual
    	usermanual.path = Contents/Resources
    	QMAKE_BUNDLE_DATA += usermanual
    
    	# openssl
    	INCLUDEPATH += /usr/local/Cellar/openssl@1.1/1.1.1g/include
    	LIBS += -L/usr/local/Cellar/openssl@1.1/1.1.1g/lib
    
    	LIBS += -framework AppKit
    	# QMAKE_MAC_SDK = macosx10.12
    	# QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12
    	# QMAKE_DEVELOPMENT_TEAM = 8KJB799CU7
    	QMAKE_TARGET_BUNDLE_PREFIX = com.vedanamedia
    	QMAKE_BUNDLE = familydiagrammac
    
    }
    
    ios {
    
    	bundle_id.name = PRODUCT_BUNDLE_IDENTIFIER
    	bundle_id.value = com.vedanamedia.familydiagram
    	QMAKE_MAC_XCODE_SETTINGS += bundle_id
    
    #	PK_CODE_SIGN_IDENTITY.name = CODE_SIGN_IDENTITY
    ##	PK_CODE_SIGN_IDENTITY.value = iPhone Developer: Patrick Stinson (J5VYQMUDH6)
    #	PK_CODE_SIGN_IDENTITY.value = iOS Distribution
    #	QMAKE_MAC_XCODE_SETTINGS += PK_CODE_SIGN_IDENTITY
    
    #	PK_PROVISIONING_PROFILE_DEBUG.name = PROVISIONING_PROFILE_Debug
    #	PK_PROVISIONING_PROFILE_DEBUG.value = 15d4b3c7-6194-4a14-baa5-f38743326429
    #	QMAKE_MAC_XCODE_SETTINGS += PK_PROVISIONING_PROFILE_DEBUG
    
    #	PK_PROVISIONING_PROFILE_SPECIFIER_DEBUG.name = PROVISIONING_PROFILE_SPECIFIER_Debug
    #	PK_PROVISIONING_PROFILE_SPECIFIER_DEBUG.value = Family Diagram Development
    #	QMAKE_MAC_XCODE_SETTINGS += PK_PROVISIONING_PROFILE_SPECIFIER_DEBUG
    
    	PK_PROVISIONING_PROFILE_RELEASE.name = PROVISIONING_PROFILE_Release
    	PK_PROVISIONING_PROFILE_RELEASE.value = 
    	QMAKE_MAC_XCODE_SETTINGS += PK_PROVISIONING_PROFILE_DEBUG
    
    	PK_PROVISIONING_PROFILE_SPECIFIER_RELEASE.name = PROVISIONING_PROFILE_SPECIFIER_Release
    	PK_PROVISIONING_PROFILE_SPECIFIER_RELEASE.value = 
    	QMAKE_MAC_XCODE_SETTINGS += PK_PROVISIONING_PROFILE_SPECIFIER_RELEASE
    
    	SETTINGS_BUNDLE_DATA.files = PKDiagram.png $$files($$PWD/Settings.bundle)
    	SETTINGS_BUNDLE_DATA.path = $$DESTDIR_TARGET
    	QMAKE_BUNDLE_DATA += SETTINGS_BUNDLE_DATA
    
    }
    
    
    win32 {
    	# fatal error C1189: #error:  The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
    	# DEFINES += _XKEYCHECK_H
    
    	# CONFIG += precompiled_header
    	# PRECOMPILED_HEADER = ..\win32-config\pch.h
    	# PRECOMPILED_SOURCE = ..\win32-config\pch.cpp
    	# HEADERS += ..\win32-config\pch.h
    }
    
    

    Any idea how to fix this compile error?

    Seems like this sort of thing usually as to do with platform-oriented defines or config settings. But it's been a long time since I've done serious windows build system work.

    Thanks!


  • Qt Champions 2019

    @patrickkidd What exact compiler and Qt versions do you use?



  • @jsulm Visual Studio 2019 (v142), qt-5.15.1 installed from qt.io installer, Windows 10 Pro with all latest updates.


  • Qt Champions 2019

    @patrickkidd Can you reproduce this issue with a minimal application including QtGui module?
    Your qmake file looks quite complex, could be that something there is causing the issue.



  • @jsulm said in Windows.h errors when including QtGui but not QtCore:

    @patrickkidd Can you reproduce this issue with a minimal application including QtGui module?
    Your qmake file looks quite complex, could be that something there is causing the issue.

    The age-old question. I suppose I was hoping for it to be well-known enough to have a simple answer. I'll see what I can do with a simple example.



  • @patrickkidd said in Windows.h errors when including QtGui but not QtCore:

    prsht.h(609): error C3646: 'hdr': unknown override specifier

    Please take everything I say here with a grain of salt, and fact-check me aggressively, because I am definitely more of a Linux developer than Microsoft Windows.

    However, I think this might be more of an issue of "general usage of Win32 in C++" than anything particular to Qt. Which in today's case (your case, @patrickkidd ) is likely to be good news, because the universe of people who know about this error is bigger than the universe of just Qt users.

    To my surprise, the EXACT error (with line numbers and all!) has many hits on a web search: "prsht.h(609): error C3646: hdr: unknown override specifier"

    Maybe these help?

    https://stackoverflow.com/questions/51901643/c-compilation-error-in-standard-windows-sdk-files

    http://python.6.x6.nabble.com/Expat-bug-in-pyqtdeploy-metadata-python-metadata-py-td5242933.html

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/160fb20e-c2b5-463a-a126-95989dc32b35/compilation-error-from-unknown-inclusion-in-vc-2015?forum=vcgeneral

    (they all suggest either adding particular #include lines, or moving certain #include lines higher up in your files. this is a "game" i remember not-so-fondly from my Win32 days)



  • @KH-219Design Yeah, I've dealt with this problem and its derivatives plenty of times over the years. As indicated in the posts you link, it usually has something to do with getting the order of windows.h and other headers (QtGui in this case) right. Less likely a stray macro. Though no luck in this case yet.



  • I was able to solve this for this project by including Python.h before QtGui. Including windows.h should have fixed it, but it doesn't. Oh well.



  • @patrickkidd I often got suck kind of problems with Windows and Qt. The solution I found is to use #include "qt_windows.h" instead of #include "windows.h"

    hope this helps



  • @KroMignon said in Windows.h errors when including QtGui but not QtCore:

    @patrickkidd I often got suck kind of problems with Windows and Qt. The solution I found is to use #include "qt_windows.h" instead of #include "windows.h"

    hope this helps

    Interesting. I was not aware of this header. But it also didn't solve it for me. Including Python.h did. No idea how that is so.


Log in to reply