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

Problems building QT x86 libraries from source with Visual Studio 2017 (15.8.3) and QT 5.11.1



  • Hi,

    I've just rebuilt my PC and installed the latest Visual Studio 2017 (15.8) and download the latest QT 5.11.1 source via the website.

    I'm in need of the 2017 32-bit libraries which do not ship. I understand that the 2015 libraries would be compatible but this should build.

    So, there are two issues, the first of which can be fixed by adding -D_ENABLE_EXTENDED_ALIGNED_STORAGE to CFLAGS_BARE in Makefile.win32.

    The second issue relates to "auto_ptr" not being part of 'std'. There are numerous suggestions on how to fix this, one being to remove:

    QMAKE_CXXFLAGS_CXX1Z = -std:c++17

    from msvc-version.conf, or change to:

    QMAKE_CXXFLAGS_CXX1Z = -std:c++1z

    but neither of these work.

    Do you have any suggestions?

    My build looks like this:

    1. x86 Native Tools Command Prompt for VS 2017
      Compiler: Microsoft (R) C/C++ Optimizing Compiler Version 19.15.26726 for x86

    2. configure -prefix %CD%\qtbase -debug-and-release -nomake examples -nomake tests -opensource

    3. nmake

    Then to clean for next build:

    1. nmake clean
    2. Delete Makefiles from \Src, \Src\qtbase\qmake

    Many thanks in advance.


  • Moderators

    Hi @CAM79,

    The first problem is fixed for Qt 5.11.2 already so at least updating to 5.11.2 will help when this is released in that respect. As for the auto_ptr issue I have not heard of this one being a problem with MSVC so far. What is the error message you are seeing there?



  • Hi Andy,

    Seems to be the same as this but building the x86 version:

    https://bugreports.qt.io/browse/QTBUG-68954

    error C2039: 'auto_ptr': is not a member of 'std' in
    qtbase\src\3rdparty\angle\src\compiler\preprocessor\MacroExpander.h

    Unfortunately, none of the suggestions in that bug report helped me.

    I found a workaround for the minute is to change the auto_ptr to uniqute_ptr in MacroExpander.h, it now compiles.

    Thanks,

    Brent.


Log in to reply