Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Unable to statically build Qt 5.2.* on Windows/MinGW
Forum Updated to NodeBB v4.3 + New Features

Unable to statically build Qt 5.2.* on Windows/MinGW

Scheduled Pinned Locked Moved General and Desktop
8 Posts 4 Posters 5.0k Views 1 Watching
  • 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.
  • N Offline
    N Offline
    nirslsk
    wrote on last edited by
    #1

    Hi there,

    While I've never had any problems building Qt statically before, from the 4.* versions all the way up to 5.1.1, both 5.2.0 and 5.2.1 fail with the same error when I try to build them statically on Windows (7 64-bit). As always, I'm using the Qt+MinGW command line (this time the 5.2.1 version that's installed as part of the latest SDK.)

    I use the command line:

    @mingw32-make -static -nomake examples -opengl desktop@

    Which after some time fails with:

    'QT_PLUGIN_PATH' is not recognized as an internal or external command, operable program or batch file.
    Project ERROR: Failed to parse qmlimportscanner output.
    make[2]: *** [sub-qml-make_first] Error 3
    make[2]: Leaving directory /c/QtLib/5.2.1-static/qtdeclarative/tools' make[1]: *** [sub-tools-make_first] Error 2 make[1]: Leaving directory /c/QtLib/5.2.1-static/qtdeclarative'
    make: *** [module-qtdeclarative-make_first] Error 2

    Any idea how I might be able to fix this?

    Thanks, Nir

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Might be a silly question but you are showing a mingw32-make call with what looks like configure options, is it a copy-paste error ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nirslsk
        wrote on last edited by
        #3

        Sorry, my mistake. Indeed, that should read:

        @configure -static -nomake examples -opengl desktop@

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Do you have anything unusual from the output of configure ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • N Offline
            N Offline
            nirslsk
            wrote on last edited by
            #5

            No... it complains if I don't specify -opengl desktop, but otherwise finishes without any warning, and a message telling me to run mingw32-make to start building...

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              You can follow this "guide":http://qt-project.org/wiki/How-to-build-a-static-Qt-for-Windows-MinGW

              It might help sort out things

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • T Offline
                T Offline
                thepyper
                wrote on last edited by
                #7

                Hi!

                I got the same problem, found the solution there:

                https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-qt5/qt-5.3.0-fix-qtAddToolEnv-under-MSYS2-with-mingw32-make.patch

                It's a patch on qt.prt file that solves some weird invocation problem on qmlimportscanner.

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  adiposity
                  wrote on last edited by
                  #8

                  If you are still looking for this, I think the link has been changed to:

                  https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-qt5/qt-5.3.0-static-qmake-conf.patch

                  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