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. Creating Mingw-64 static Qt
Forum Updated to NodeBB v4.3 + New Features

Creating Mingw-64 static Qt

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 2 Posters 752 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.
  • M Offline
    M Offline
    mchome
    wrote on 1 Jan 2020, 20:21 last edited by
    #1

    I deploy my programs in Windows as single-file executables.
    To do this, some years ago I created a Win32 static version of Qt 5.7 using Mingw32, which I still use.

    Now, I would like to repeat this using Mingw64. Unfortunately the instructions in https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW
    are for Win32.
    I tried to adapt them to the Mingw64, but I incurred in a trivial but nasty issue:
    I must change
    configure -platform mingw32--g++
    into something good for Mingw64, but I cannot envisage what to specify as "platform,"
    More in general, I would like to have some "how-to" to get a running static version of Qt for Minw64, similar to the one in https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW

    The instructions in
    https://forum.qt.io/topic/78052/installing-qt-64bit-and-qt-static-64-bit-on-windows-7/2
    seem to be what I need, but they do not give any control on which version to compile and on where to install stuff (I would like not to spoil my precious C-disk space, which is a fast SSD, with small capacity)

    Has anyone experience in such things?

    Thanks.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      Leonardo
      wrote on 2 Jan 2020, 03:08 last edited by
      #2

      I have never built Qt for 64 bits on Windows, but what would happen if you had the 64 bits MinGW in your PATH instead of the 32 bits one while building?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mchome
        wrote on 2 Jan 2020, 16:26 last edited by
        #3

        In configure.bat I have several commands referring to Mingw32:

        configure -platform mingw32--g++
        ...
        mingw32-make -k -j4
        mingw32-make -k install
        It also somehow patches mkspecs for static build of an application

        So it seems a more complex task than just adjusting a path.

        However, I'll try a bit more to follow your hint. Even though I remember that making (somehow) blind attemtps in this field is crazily time consuming: errors can occur after several hours of PC activity (configuration, compilation).

        1 Reply Last reply
        0
        • L Offline
          L Offline
          Leonardo
          wrote on 2 Jan 2020, 16:32 last edited by
          #4

          Maybe MSYS2 would be a better environment for you. I feel like configure.sh is way better than configure.bat for custom builds.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mchome
            wrote on 5 Jan 2020, 16:57 last edited by
            #5

            I did it! I used
            https://forum.qt.io/topic/78052/installing-qt-64bit-and-qt-static-64-bit-on-windows-7/2

            For history:

            1. I installed msys2 in a secondary, magnetic HD and checked that it installs its stuff (compilers, compiled stuff) in the same HD, so I would not interfere with my smaller SSD
            2. I tried the procedure in the above link but got a virus warning from Norton. I don't know whether it is a false positive, but for maximum security, I interrupted the process
            3. therefore I tried the same procedure inside an Oracle Virtual Box running Win7 64 bit. It worked.

            Probably the procedure is not optimized since occupied 32 GB, but the target of having a system to create 64-bit Windows executable from my sources is reached.

            1 Reply Last reply
            1
            • L Offline
              L Offline
              Leonardo
              wrote on 5 Jan 2020, 20:00 last edited by
              #6

              Building for debug with MinGW can result in really large binary files. It's most likely not your fault.

              1 Reply Last reply
              0

              1/6

              1 Jan 2020, 20:21

              • Login

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