Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt 5.10 mingw64 static building failed

Qt 5.10 mingw64 static building failed

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 3 Posters 2.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gzhang
    wrote on last edited by gzhang
    #1

    Hi,
    I have been tried to build a static version of Qt 5.10 from source using mingw64 (v5.3, 64-bit).
    My configuration is:
    -static -debug-and-release -platform win32-g++ -prefix C:\Qt\Static_64\5.10.0 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -sql-sqlite -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests
    The building stopped at errors:
    g++: error:
    C:\Qt\Static_64\src\qt-everywhere-src-5.10.0\qtimageformats\plugins\imageformats\libqwebp.a: No
    such file or directory
    mingw32-make[4]: *** [....\bin\dumpdoc.exe] Error 1
    mingw32-make[4]: Target 'first' not remade because of errors.
    mingw32-make[3]: *** [release] Error 2
    mingw32-make[3]: Target 'first' not remade because of errors.
    mingw32-make[2]: *** [sub-dumpdoc-make_first-ordered] Error 2
    mingw32-make[2]: Target 'first' not remade because of errors.
    mingw32-make[1]: *** [sub-tools-make_first] Error 2
    mingw32-make[1]: Target 'first' not remade because of errors.
    mingw32-make: *** [module-qtactiveqt-make_first] Error 2

    compiler\qqmlpropertyvalidator.cpp: In member function 'QVector<QQmlCompileError>
    QQmlPropertyValidator::validateObject(int, const QV4::CompiledData::Binding*, bool) const':
    compiler\qqmlpropertyvalidator.cpp:82:27: warning: assuming signed overflow does not occur when
    assuming that (X + c) < X is always false [-Wstrict-overflow]
    QVector<QQmlCompileError> QQmlPropertyValidator::validateObject(int objectIndex, const
    QV4::CompiledData::Binding *instantiatingBinding, bool populatingValueTypeGroupProperty) const
    ^

    C
    :\Qt\Static_64\src\qt-everywhere-src-5.10.0\qtbase\plugins\platforms\libqwindows.a(qwindowssystemtr
    ayicon.o):qwindowssystemtrayicon.cpp:(.text+0x9c6): undefined reference to
    `__imp_ChangeWindowMessageFilterEx
    '
    collect2.exe: error: ld returned 1 exit status

    mingw32-make[4]: *** [....\bin\qmltestrunner.exe] Error 1
    mingw32-make[4]: Target 'first' not remade because of errors.
    mingw32-make[3]: *** [release] Error 2
    mingw32-make[3]: Target 'first' not remade because of errors.
    mingw32-make[2]: *** [sub-qmltestrunner-make_first] Error 2

    C
    :\Qt\Static_64\src\qt-everywhere-src-5.10.0\qtbase\plugins\platforms\libqwindows.a(qwindowssystemtr
    ayicon.o):qwindowssystemtrayicon.cpp:(.text+0x9c6): undefined reference to
    `__imp_ChangeWindowMessageFilterEx
    '
    collect2.exe: error: ld returned 1 exit status

    mingw32-make[4]: *** [....\bin\qml.exe] Error 1
    mingw32-make[4]: Target 'first' not remade because of errors.
    mingw32-make[3]: *** [release] Error 2
    mingw32-make[3]: Target 'first' not remade because of errors.
    mingw32-make[2]: *** [sub-qml-make_first] Error 2
    mingw32-make[2]: Target 'first' not remade because of errors.
    mingw32-make[1]: *** [sub-tools-make_first] Error 2
    mingw32-make[1]: Target 'first' not remade because of errors.
    mingw32-make: *** [module-qtdeclarative-make_first] Error 2
    mingw32-make: Target 'first' not remade because of errors.

    mingw32-make : C:\Qt\Static_64\src\qt-everywhere-src-5.10.0\qtbase\plugins\platforms\libqwindows.a(
    qwindowssystemtrayicon.o):qwindowssystemtrayicon.cpp:(.text+0x9c6): undefined reference to
    `__imp_ChangeWindowMessageFilterEx'
    (C:\Qt\Static_64...essageFilterEx':String) [], RemoteE
    xception
    + FullyQualifiedErrorId : NativeCommandError

    collect2.exe: error: ld returned 1 exit status

    mingw32-make[4]: *** [....\bin\dumpdoc.exe] Error 1
    mingw32-make[4]: Target 'install' not remade because of errors.
    mingw32-make[3]: *** [release-install] Error 2
    mingw32-make[3]: Target 'install' not remade because of errors.
    mingw32-make[2]: *** [sub-dumpdoc-install_subtargets-ordered] Error 2
    mingw32-make[2]: Target 'install' not remade because of errors.
    mingw32-make[1]: *** [sub-tools-install_subtargets] Error 2
    mingw32-make[1]: Target 'install' not remade because of errors.
    mingw32-make: *** [module-qtactiveqt-install_subtargets] Error 2

    C
    :\Qt\Static_64\src\qt-everywhere-src-5.10.0\qtbase\plugins\platforms\libqwindows.a(qwindowssystemtr
    ayicon.o):qwindowssystemtrayicon.cpp:(.text+0x9c6): undefined reference to
    `__imp_ChangeWindowMessageFilterEx
    '
    collect2.exe: error: ld returned 1 exit status
    mingw32-make[4]: *** [....\bin\qml.exe] Error 1
    mingw32-make[4]: Target 'install' not remade because of errors.
    mingw32-make[3]: *** [release-install] Error 2
    mingw32-make[3]: Target 'install' not remade because of errors.
    mingw32-make[2]: *** [sub-qml-install_subtargets] Error 2

    C
    :\Qt\Static_64\src\qt-everywhere-src-5.10.0\qtbase\plugins\platforms\libqwindows.a(qwindowssystemtr
    ayicon.o):qwindowssystemtrayicon.cpp:(.text+0x9c6): undefined reference to
    `__imp_ChangeWindowMessageFilterEx
    '
    collect2.exe: error: ld returned 1 exit status

    mingw32-make[4]: *** [....\bin\qmltestrunner.exe] Error 1
    mingw32-make[4]: Target 'install' not remade because of errors.
    mingw32-make[3]: *** [release-install] Error 2

    It seems Qt could not locate 'libuser32.a', which actually exists. Any idea how to fix it? The same compiler and configuration builds successfully with Qt 5.9.1

    A 1 Reply Last reply
    0
    • G gzhang

      Hi,
      I have been tried to build a static version of Qt 5.10 from source using mingw64 (v5.3, 64-bit).
      My configuration is:
      -static -debug-and-release -platform win32-g++ -prefix C:\Qt\Static_64\5.10.0 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -sql-sqlite -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests
      The building stopped at errors:
      g++: error:
      C:\Qt\Static_64\src\qt-everywhere-src-5.10.0\qtimageformats\plugins\imageformats\libqwebp.a: No
      such file or directory
      mingw32-make[4]: *** [....\bin\dumpdoc.exe] Error 1
      mingw32-make[4]: Target 'first' not remade because of errors.
      mingw32-make[3]: *** [release] Error 2
      mingw32-make[3]: Target 'first' not remade because of errors.
      mingw32-make[2]: *** [sub-dumpdoc-make_first-ordered] Error 2
      mingw32-make[2]: Target 'first' not remade because of errors.
      mingw32-make[1]: *** [sub-tools-make_first] Error 2
      mingw32-make[1]: Target 'first' not remade because of errors.
      mingw32-make: *** [module-qtactiveqt-make_first] Error 2

      compiler\qqmlpropertyvalidator.cpp: In member function 'QVector<QQmlCompileError>
      QQmlPropertyValidator::validateObject(int, const QV4::CompiledData::Binding*, bool) const':
      compiler\qqmlpropertyvalidator.cpp:82:27: warning: assuming signed overflow does not occur when
      assuming that (X + c) < X is always false [-Wstrict-overflow]
      QVector<QQmlCompileError> QQmlPropertyValidator::validateObject(int objectIndex, const
      QV4::CompiledData::Binding *instantiatingBinding, bool populatingValueTypeGroupProperty) const
      ^

      C
      :\Qt\Static_64\src\qt-everywhere-src-5.10.0\qtbase\plugins\platforms\libqwindows.a(qwindowssystemtr
      ayicon.o):qwindowssystemtrayicon.cpp:(.text+0x9c6): undefined reference to
      `__imp_ChangeWindowMessageFilterEx
      '
      collect2.exe: error: ld returned 1 exit status

      mingw32-make[4]: *** [....\bin\qmltestrunner.exe] Error 1
      mingw32-make[4]: Target 'first' not remade because of errors.
      mingw32-make[3]: *** [release] Error 2
      mingw32-make[3]: Target 'first' not remade because of errors.
      mingw32-make[2]: *** [sub-qmltestrunner-make_first] Error 2

      C
      :\Qt\Static_64\src\qt-everywhere-src-5.10.0\qtbase\plugins\platforms\libqwindows.a(qwindowssystemtr
      ayicon.o):qwindowssystemtrayicon.cpp:(.text+0x9c6): undefined reference to
      `__imp_ChangeWindowMessageFilterEx
      '
      collect2.exe: error: ld returned 1 exit status

      mingw32-make[4]: *** [....\bin\qml.exe] Error 1
      mingw32-make[4]: Target 'first' not remade because of errors.
      mingw32-make[3]: *** [release] Error 2
      mingw32-make[3]: Target 'first' not remade because of errors.
      mingw32-make[2]: *** [sub-qml-make_first] Error 2
      mingw32-make[2]: Target 'first' not remade because of errors.
      mingw32-make[1]: *** [sub-tools-make_first] Error 2
      mingw32-make[1]: Target 'first' not remade because of errors.
      mingw32-make: *** [module-qtdeclarative-make_first] Error 2
      mingw32-make: Target 'first' not remade because of errors.

      mingw32-make : C:\Qt\Static_64\src\qt-everywhere-src-5.10.0\qtbase\plugins\platforms\libqwindows.a(
      qwindowssystemtrayicon.o):qwindowssystemtrayicon.cpp:(.text+0x9c6): undefined reference to
      `__imp_ChangeWindowMessageFilterEx'
      (C:\Qt\Static_64...essageFilterEx':String) [], RemoteE
      xception
      + FullyQualifiedErrorId : NativeCommandError

      collect2.exe: error: ld returned 1 exit status

      mingw32-make[4]: *** [....\bin\dumpdoc.exe] Error 1
      mingw32-make[4]: Target 'install' not remade because of errors.
      mingw32-make[3]: *** [release-install] Error 2
      mingw32-make[3]: Target 'install' not remade because of errors.
      mingw32-make[2]: *** [sub-dumpdoc-install_subtargets-ordered] Error 2
      mingw32-make[2]: Target 'install' not remade because of errors.
      mingw32-make[1]: *** [sub-tools-install_subtargets] Error 2
      mingw32-make[1]: Target 'install' not remade because of errors.
      mingw32-make: *** [module-qtactiveqt-install_subtargets] Error 2

      C
      :\Qt\Static_64\src\qt-everywhere-src-5.10.0\qtbase\plugins\platforms\libqwindows.a(qwindowssystemtr
      ayicon.o):qwindowssystemtrayicon.cpp:(.text+0x9c6): undefined reference to
      `__imp_ChangeWindowMessageFilterEx
      '
      collect2.exe: error: ld returned 1 exit status
      mingw32-make[4]: *** [....\bin\qml.exe] Error 1
      mingw32-make[4]: Target 'install' not remade because of errors.
      mingw32-make[3]: *** [release-install] Error 2
      mingw32-make[3]: Target 'install' not remade because of errors.
      mingw32-make[2]: *** [sub-qml-install_subtargets] Error 2

      C
      :\Qt\Static_64\src\qt-everywhere-src-5.10.0\qtbase\plugins\platforms\libqwindows.a(qwindowssystemtr
      ayicon.o):qwindowssystemtrayicon.cpp:(.text+0x9c6): undefined reference to
      `__imp_ChangeWindowMessageFilterEx
      '
      collect2.exe: error: ld returned 1 exit status

      mingw32-make[4]: *** [....\bin\qmltestrunner.exe] Error 1
      mingw32-make[4]: Target 'install' not remade because of errors.
      mingw32-make[3]: *** [release-install] Error 2

      It seems Qt could not locate 'libuser32.a', which actually exists. Any idea how to fix it? The same compiler and configuration builds successfully with Qt 5.9.1

      A Offline
      A Offline
      ambershark
      wrote on last edited by
      #2

      @gzhang said in Qt 5.10 mingw64 static building failed:

      C:\Qt\Static_64\src\qt-everywhere-src-5.10.0\qtimageformats\plugins\imageformats\libqwebp.a: No
      such file or directory

      That is the only error I see. I don't see anything about libuser32.a.

      And to me that error suggests the plugin was not compiled and therefore can't be found.

      Second problem is your missing references.. Here is a link showing that there is an issue with mingw and those particular exports:

      https://sourceforge.net/p/mingw-w64/mailman/message/35677950/

      From the sounds of it, it was patched in mingw, however you may be using an older version.

      I've found when building qt with mingw64 in the past that it is VERY picky. You will need to use the exact version that was used for the official Qt build. If you don't expect to run into a lot of problems like you are seeing with undefined externals and such.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      1 Reply Last reply
      2
      • G Offline
        G Offline
        gzhang
        wrote on last edited by
        #3

        Thanks! I have been using the mingw version that comes with the official Qt. Strange that it compiled with 5.9.1 but not 5.10.0. Since the official release has not included a 64-bit mingw, I suppose we can only wait for 5.11, where it says 'upgrade to mingw 64 bit': https://wiki.qt.io/Qt_5.11_Tools_and_Versions

        1 Reply Last reply
        0
        • A Offline
          A Offline
          amansx
          wrote on last edited by
          #4

          @gzhang did you find out how to fix this?

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved