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

[solved, kind of] Qt 4.8.6 Build Error Regression (MSVC)



  • Building Qt 4.8.6 with MSVC 2013 results in the following error:

    @kernel\qsystemerror.cpp(131) : warning C4996: 'strerror': This function or varia
    ble may be unsafe. Consider using strerror_s instead. To disable deprecation, us
    e _CRT_SECURE_NO_WARNINGS. See online help for details.
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\string.h(
    168) : see declaration of 'strerror'
    qeventdispatcher_win.cpp
    kernel\qeventdispatcher_win.cpp(515) : error C2065: 'QS_TOUCH' : undeclared iden
    tifier
    kernel\qeventdispatcher_win.cpp(515) : error C2065: 'QS_POINTER' : undeclared id
    entifier
    qcoreapplication_win.cpp
    qwineventnotifier_p.cpp
    qsharedmemory_win.cpp
    qsystemsemaphore_win.cpp
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
    \VC\BIN\cl.EXE"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
    \VC\BIN\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.@

    Since Qt 4.8.5 compiled fine, this seems to be a regression. Any workarounds?

    Regards,
    MuldeR



  • Update:

    The problematic code is:
    @static inline UINT inputTimerMask()
    {
    UINT result = QS_TIMER | QS_INPUT | QS_RAWINPUT;
    // QTBUG 28513, QTBUG-29097, QTBUG-29435: QS_TOUCH, QS_POINTER became part of
    // QS_INPUT in Windows Kit 8. They should not be used when running on pre-Windows 8.
    #if defined(_MSC_VER) && _MSC_VER >= 1700
    if (QSysInfo::WindowsVersion < QSysInfo::WV_WINDOWS8)
    result &= ~(QS_TOUCH | QS_POINTER);
    #endif // _MSC_VER >= 1700
    return result;
    }@

    FWIW, I'm building on Windows 7 SP-1 with VS2013 and Win SDK 7.1.



  • Update 2

    Found a solution here:
    https://qt.gitorious.org/qt/mumble-developers-qt/commit/fa21fd9cfe5faf4494aa0b37892fa8651d9c72ed

    Too bad that didn't make it into the 4.8.6 release.


  • Lifetime Qt Champion

    Hi,

    From what I see, it's not yet in Qt 4 at all, do you know if it has been reported ?



  • At least the above fix is the only thing I found so far...

    The problem seems to be that the current code assumes "QS_TOUCH" and "QS_POINTER" are defined when a specific minimum compiler version is used, while in fact it depend on the version of the Windows SDK, not the compiler. In particular, VS2012 and VS2013 will fall back to an older SDK version when "Windows XP" support is enabled. So the assumption that an up-to-date compiler implies an up-to-date Windows SDK isn't always correct...

    (Now one might argue that we don't need to care about Windows XP anymore. But my stats tell me that Windows XP won't go away that fast. It's currently at approx. 17% - more than Windows 8 and 8.1 combined)


  • Lifetime Qt Champion

    Sounds like a bug report would be thing to do




Log in to reply