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. Qt6 build 32bit on 64bit

Qt6 build 32bit on 64bit

Scheduled Pinned Locked Moved Solved Installation and Deployment
11 Posts 4 Posters 3.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.
  • R Offline
    R Offline
    Redman
    wrote on last edited by
    #1

    Hello,

    to my understanding configuring a kit like followed should make it able to build 32-bit application from Qt6 64-bit.

    612284fc-a9e9-4c27-a066-ef1ae9deea32-image.png

    Telling the kit to use the amd64_x86 compiler means to use a 64-bit compiler toolset to produce binaries for your program targeting a 32-bit platform afaik.

    I get following error:
    92141aa0-40d0-4aaf-b80f-f12e1c647674-image.png

    Christian EhrlicherC 1 Reply Last reply
    0
    • R Redman

      @jsulm I mean the vcvarsall.bat amd64_x86 change. But dont mind it.

      I once again followed the guide behind the link you posted. Same result as in the screenshots

      R Offline
      R Offline
      Redman
      wrote on last edited by Redman
      #8

      I found the solution thanks to @jsulm:

      https://doc.qt.io/qt-6/windows-building.html#step-3-set-the-environment-variables
      %SystemRoot%\system32\cmd.exe /E:ON /V:ON /k C:\Qt\qt6vars.cmd run this command in your cmd to set up the environment and KEEP the cmd OPEN. After that everything worked.

      Christian EhrlicherC 1 Reply Last reply
      2
      • R Redman

        Hello,

        to my understanding configuring a kit like followed should make it able to build 32-bit application from Qt6 64-bit.

        612284fc-a9e9-4c27-a066-ef1ae9deea32-image.png

        Telling the kit to use the amd64_x86 compiler means to use a 64-bit compiler toolset to produce binaries for your program targeting a 32-bit platform afaik.

        I get following error:
        92141aa0-40d0-4aaf-b80f-f12e1c647674-image.png

        Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #2

        If you want to built a 32bit executable all your dependent libraries are also need to be 32bit. This means you need a 32bit Qt libraries. Since there are no pre-built ones you have to compile it by your own.

        But why someone would need a 32bit executable nowadays?

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        R 1 Reply Last reply
        2
        • Christian EhrlicherC Christian Ehrlicher

          If you want to built a 32bit executable all your dependent libraries are also need to be 32bit. This means you need a 32bit Qt libraries. Since there are no pre-built ones you have to compile it by your own.

          But why someone would need a 32bit executable nowadays?

          R Offline
          R Offline
          Redman
          wrote on last edited by
          #3

          @Christian-Ehrlicher
          I just configured the kit as shown and as you said, the linker could'nt find the corresponding 32-bit symbols.

          I tried building Qt6 32-bit from source. But following error made me give up tbh.

          e7eb24d2-d5cd-4d2a-a842-65effadb31f8-image.png
          059172d3-602a-4e9a-80f5-9a39a668dd66-image.png

          FYI: During covid times it was impossible to get a 64-bit industrial pc so we had to settle for 32-bit for our testing environment. We deploy 64-bit for our customers.

          jsulmJ 1 Reply Last reply
          0
          • R Redman

            @Christian-Ehrlicher
            I just configured the kit as shown and as you said, the linker could'nt find the corresponding 32-bit symbols.

            I tried building Qt6 32-bit from source. But following error made me give up tbh.

            e7eb24d2-d5cd-4d2a-a842-65effadb31f8-image.png
            059172d3-602a-4e9a-80f5-9a39a668dd66-image.png

            FYI: During covid times it was impossible to get a 64-bit industrial pc so we had to settle for 32-bit for our testing environment. We deploy 64-bit for our customers.

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

            @Redman Did you use 32bit cmd provided by your Visual Studio set-up to have a terminal preconfigured to use Visual C++ 32bit environment?

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

            R 1 Reply Last reply
            0
            • jsulmJ jsulm

              @Redman Did you use 32bit cmd provided by your Visual Studio set-up to have a terminal preconfigured to use Visual C++ 32bit environment?

              R Offline
              R Offline
              Redman
              wrote on last edited by
              #5

              @jsulm
              Not sure how to do that.
              But I called vcvarsall.bat amd64_x86 . Im not quite sure where in the toolchain the change I made is applied

              jsulmJ 1 Reply Last reply
              0
              • R Redman

                @jsulm
                Not sure how to do that.
                But I called vcvarsall.bat amd64_x86 . Im not quite sure where in the toolchain the change I made is applied

                jsulmJ Online
                jsulmJ Online
                jsulm
                Lifetime Qt Champion
                wrote on last edited by jsulm
                #6

                @Redman said in Qt6 build 32bit on 64bit:

                the change I made is applied

                What change do you mean?
                Take a look at https://doc.qt.io/qt-6/windows-building.html

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

                R 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @Redman said in Qt6 build 32bit on 64bit:

                  the change I made is applied

                  What change do you mean?
                  Take a look at https://doc.qt.io/qt-6/windows-building.html

                  R Offline
                  R Offline
                  Redman
                  wrote on last edited by
                  #7

                  @jsulm I mean the vcvarsall.bat amd64_x86 change. But dont mind it.

                  I once again followed the guide behind the link you posted. Same result as in the screenshots

                  R 1 Reply Last reply
                  0
                  • R Redman

                    @jsulm I mean the vcvarsall.bat amd64_x86 change. But dont mind it.

                    I once again followed the guide behind the link you posted. Same result as in the screenshots

                    R Offline
                    R Offline
                    Redman
                    wrote on last edited by Redman
                    #8

                    I found the solution thanks to @jsulm:

                    https://doc.qt.io/qt-6/windows-building.html#step-3-set-the-environment-variables
                    %SystemRoot%\system32\cmd.exe /E:ON /V:ON /k C:\Qt\qt6vars.cmd run this command in your cmd to set up the environment and KEEP the cmd OPEN. After that everything worked.

                    Christian EhrlicherC 1 Reply Last reply
                    2
                    • R Redman has marked this topic as solved on
                    • R Redman

                      I found the solution thanks to @jsulm:

                      https://doc.qt.io/qt-6/windows-building.html#step-3-set-the-environment-variables
                      %SystemRoot%\system32\cmd.exe /E:ON /V:ON /k C:\Qt\qt6vars.cmd run this command in your cmd to set up the environment and KEEP the cmd OPEN. After that everything worked.

                      Christian EhrlicherC Offline
                      Christian EhrlicherC Offline
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on last edited by
                      #9

                      @Redman said in Qt6 build 32bit on 64bit:

                      up the environment and KEEP the cmd OPEN.

                      Why should something you set up in one cmd instance be active in another one??

                      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                      Visit the Qt Academy at https://academy.qt.io/catalog

                      R 1 Reply Last reply
                      0
                      • Christian EhrlicherC Christian Ehrlicher

                        @Redman said in Qt6 build 32bit on 64bit:

                        up the environment and KEEP the cmd OPEN.

                        Why should something you set up in one cmd instance be active in another one??

                        R Offline
                        R Offline
                        Redman
                        wrote on last edited by
                        #10

                        @Christian-Ehrlicher To me it seemed like a global variable that was set. Hence my assumption I could close the cmd.

                        JonBJ 1 Reply Last reply
                        0
                        • R Redman

                          @Christian-Ehrlicher To me it seemed like a global variable that was set. Hence my assumption I could close the cmd.

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

                          @Redman
                          These .bat or .cmd files set environment variables. Their setting only lasts for the duration of the cmd/Command Prompt where the script file is run (and anything spawned from there, e.g. compilations), they do not persist to your machine's environment as a whole.

                          1 Reply Last reply
                          2
                          • R Redman referenced this topic on
                          • JonBJ JonB referenced this topic on

                          • Login

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