Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. I ve downloaded the qt6 version and mingw for gcc 11 version
Forum Updated to NodeBB v4.3 + New Features

I ve downloaded the qt6 version and mingw for gcc 11 version

Scheduled Pinned Locked Moved Unsolved Qt 6
12 Posts 4 Posters 2.0k 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.
  • nicker playerN Offline
    nicker playerN Offline
    nicker player
    wrote on last edited by
    #1

    theres only a mingw1120_64 version in the qt install tool package.
    How could i use the mingw1120_64 to compile a windows 32 cpu program?

    jsulmJ 1 Reply Last reply
    0
    • nicker playerN nicker player

      theres only a mingw1120_64 version in the qt install tool package.
      How could i use the mingw1120_64 to compile a windows 32 cpu program?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @nicker-player Do you mean you want to build an app as 32bit application? If you want to do that with Qt you will need to compile Qt by yourself - QtCompany does not provide 32bit binaries anymore.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • nicker playerN Offline
        nicker playerN Offline
        nicker player
        wrote on last edited by
        #3

        8d4583b5-1e71-4644-a5d3-609cd53e1b4f-image.png
        And what's usage of the exe files in the mingw tool module file?
        Dosent it cross-compile the 32bit application on the windows 64bit os ?

        jsulmJ 1 Reply Last reply
        0
        • nicker playerN nicker player

          8d4583b5-1e71-4644-a5d3-609cd53e1b4f-image.png
          And what's usage of the exe files in the mingw tool module file?
          Dosent it cross-compile the 32bit application on the windows 64bit os ?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @nicker-player said in I ve downloaded the qt6 version and mingw for gcc 11 version:

          Dosent it cross-compile the 32bit application on the windows 64bit os ?

          No, it does not.
          x86_64 means that it is for x86_64 architecture (so, it generates 64bit binaries). mingw32 is just a name.
          Do you really want to build for 32bit?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • nicker playerN Offline
            nicker playerN Offline
            nicker player
            wrote on last edited by
            #5

            Yeah in fact I just met a very difficult problem that my program was compiled with the mingw32make.
            And now the new plugin was created by the c++20,I found that only gcc 11 up surpport the c++20,
            I dont want to write lots of wrappers and cant trans to the vs compiler.

            JonBJ 1 Reply Last reply
            0
            • nicker playerN nicker player

              Yeah in fact I just met a very difficult problem that my program was compiled with the mingw32make.
              And now the new plugin was created by the c++20,I found that only gcc 11 up surpport the c++20,
              I dont want to write lots of wrappers and cant trans to the vs compiler.

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #6

              @nicker-player I don't see what that has to do with 32- versus 64-bit target.

              1 Reply Last reply
              0
              • kkoehneK Offline
                kkoehneK Offline
                kkoehne
                Moderators
                wrote on last edited by kkoehne
                #7

                Yeah in fact I just met a very difficult problem that my program was compiled with the mingw32make.

                As others already have written, the 32 in mingw32 is a red herring. It used to be standing for 32 bit (when I believe 16 bit was still a thing). Anyhow, nowadays it's just a name, so 'mingw32 API', 'mingw32-make' etc all also work on 64 bit!

                So, coming back to the original question: Do you really need an executable that runs on Windows 32bit-only? Note that this is very rare, as Microsoft has been providing 64 bit Windows versions by default since more than a decade IIRC. The latest Windows 11 also doesn't have a 32 bit version anymore (though it seems that you could still install Windows 10 on a 32 bit only machine??).

                If you do not need 32 bit actually, please use the mingw1120_64 toolchain that is part of Qt. It also contains a mingw32-make ;)

                Director R&D, The Qt Company

                1 Reply Last reply
                2
                • nicker playerN Offline
                  nicker playerN Offline
                  nicker player
                  wrote on last edited by nicker player
                  #8

                  And if it's possible to use the gcc -m32 config to compile a 32bit application on the windows by using the mingw64-gcc11?
                  I put the test code and that the compiler told me that could not find the -lkernel32 something else.How to solve it?

                  g++ -m32 -lstdc++ -o test c:\test.c
                  

                  e520ccb3-5424-4d5c-8c2e-0bf985a02728-image.png

                  jsulmJ 1 Reply Last reply
                  0
                  • nicker playerN nicker player

                    And if it's possible to use the gcc -m32 config to compile a 32bit application on the windows by using the mingw64-gcc11?
                    I put the test code and that the compiler told me that could not find the -lkernel32 something else.How to solve it?

                    g++ -m32 -lstdc++ -o test c:\test.c
                    

                    e520ccb3-5424-4d5c-8c2e-0bf985a02728-image.png

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by jsulm
                    #9

                    @nicker-player said in I ve downloaded the qt6 version and mingw for gcc 11 version:

                    And if it's possible to use the gcc -m32 config to compile a 32bit application on the windows by using the mingw64-gcc11?

                    No. If you want a 32bit binary you also need compiler which outputs 32bit binaries and you also need 32bit Qt build if your app uses Qt. Qt installer does not provide 32bit compiler and it also does not provide 32bit Qt builds anymore. You will have to install 32bit MinGW and compile Qt using this compiler by yourself.
                    But the question is: why do you need a 32bit binary?

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    nicker playerN 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @nicker-player said in I ve downloaded the qt6 version and mingw for gcc 11 version:

                      And if it's possible to use the gcc -m32 config to compile a 32bit application on the windows by using the mingw64-gcc11?

                      No. If you want a 32bit binary you also need compiler which outputs 32bit binaries and you also need 32bit Qt build if your app uses Qt. Qt installer does not provide 32bit compiler and it also does not provide 32bit Qt builds anymore. You will have to install 32bit MinGW and compile Qt using this compiler by yourself.
                      But the question is: why do you need a 32bit binary?

                      nicker playerN Offline
                      nicker playerN Offline
                      nicker player
                      wrote on last edited by
                      #10

                      @jsulm
                      Its a very long story ,cause the customer claimed that the application need to run on the old machines which only support the 32bit windows.
                      And Is it hard to recompile the qt and the compiler tools ?

                      jsulmJ JonBJ 2 Replies Last reply
                      0
                      • nicker playerN nicker player

                        @jsulm
                        Its a very long story ,cause the customer claimed that the application need to run on the old machines which only support the 32bit windows.
                        And Is it hard to recompile the qt and the compiler tools ?

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        @nicker-player said in I ve downloaded the qt6 version and mingw for gcc 11 version:

                        And Is it hard to recompile the qt and the compiler tools ?

                        Compiling Qt is not an easy task. See https://wiki.qt.io/Building_Qt_5_from_Git

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • nicker playerN nicker player

                          @jsulm
                          Its a very long story ,cause the customer claimed that the application need to run on the old machines which only support the 32bit windows.
                          And Is it hard to recompile the qt and the compiler tools ?

                          JonBJ Offline
                          JonBJ Offline
                          JonB
                          wrote on last edited by
                          #12

                          @nicker-player said in I ve downloaded the qt6 version and mingw for gcc 11 version:

                          Its a very long story ,cause the customer claimed that the application need to run on the old machines which only support the 32bit windows.

                          Then really you should use an old version of Qt which naturally supported 32-bit binaries, and tell customer they cannot have any newer features. This may well be easier in practice than trying to compile newer Qts to produce 32-bit.

                          1 Reply Last reply
                          1

                          • Login

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