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. Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.
Forum Updated to NodeBB v4.3 + New Features

Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.

Scheduled Pinned Locked Moved Solved General and Desktop
32 Posts 7 Posters 3.4k Views 2 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #7

    In the Kit settings

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

    H 1 Reply Last reply
    0
    • SGaistS SGaist

      In the Kit settings

      H Offline
      H Offline
      hbatalha
      wrote on last edited by hbatalha
      #8

      @SGaist this one?

      Screenshot_5.png

      Screenshot_6.png

      1 Reply Last reply
      0
      • nageshN Offline
        nageshN Offline
        nagesh
        wrote on last edited by
        #9

        @hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:

        I am trying to build 32-bit application after successfully building the 64-bit.

        Did the same project successfully built in 64-bit?

        looks like uic compiler of Qt4 version is linked, clean and rebuild the project.

        check whether generated "ui_mainwindow.h" file having current timestamp.

        have a look into makefile and check whether it's reflecting the valid settings.
        (QMAKE/CXXFLAGS)

        H 1 Reply Last reply
        0
        • nageshN nagesh

          @hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:

          I am trying to build 32-bit application after successfully building the 64-bit.

          Did the same project successfully built in 64-bit?

          looks like uic compiler of Qt4 version is linked, clean and rebuild the project.

          check whether generated "ui_mainwindow.h" file having current timestamp.

          have a look into makefile and check whether it's reflecting the valid settings.
          (QMAKE/CXXFLAGS)

          H Offline
          H Offline
          hbatalha
          wrote on last edited by hbatalha
          #10

          @nagesh said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:

          Did the same project successfully built in 64-bit?

          I came to realize that the 64-bit that built successfully is the Qt 6.0.0 mingw 64 bit and Qt 6.0.1 mingw 64 bit not Qt 5.15.2 mingw 64 bit as I don't have it installed.

          clean and rebuild the project.

          Did that multiple times, same result

          check whether generated "ui_mainwindow.h" file having current timestamp.

          Didn't understand, how do I do that?

          have a look into makefile and check whether it's reflecting the valid settings.

          How will I know if it not reflecting valid settings

          nageshN 1 Reply Last reply
          0
          • Christian EhrlicherC Christian Ehrlicher

            @hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:

            #include <QtGui/QAction>

            This is Qt4. Are you sure you installed Qt4/32bit correctly? I would guess no.
            Make sure the correct uic compiler is picked up (the Qt5 one) if you have installed and want to use Qt5

            H Offline
            H Offline
            hbatalha
            wrote on last edited by hbatalha
            #11

            @Christian-Ehrlicher said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:

            Make sure the correct uic compiler is picked up (the Qt5 one) if you have installed and want to use Qt5

            How will I check that?

            1 Reply Last reply
            0
            • H hbatalha

              @nagesh said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:

              Did the same project successfully built in 64-bit?

              I came to realize that the 64-bit that built successfully is the Qt 6.0.0 mingw 64 bit and Qt 6.0.1 mingw 64 bit not Qt 5.15.2 mingw 64 bit as I don't have it installed.

              clean and rebuild the project.

              Did that multiple times, same result

              check whether generated "ui_mainwindow.h" file having current timestamp.

              Didn't understand, how do I do that?

              have a look into makefile and check whether it's reflecting the valid settings.

              How will I know if it not reflecting valid settings

              nageshN Offline
              nageshN Offline
              nagesh
              wrote on last edited by
              #12

              @hbatalha in the build directory check for Makefile. Debug/Release based on your build
              and search for bin/uic and confirm it's from the currect version..

              H 1 Reply Last reply
              0
              • nageshN nagesh

                @hbatalha in the build directory check for Makefile. Debug/Release based on your build
                and search for bin/uic and confirm it's from the currect version..

                H Offline
                H Offline
                hbatalha
                wrote on last edited by
                #13

                @nagesh So I uinstalled Qt 5.15.2 MinGW 32-bit and installed Qt 5.15.1 MinGW 32-bit(just for the sake of trying), same results

                search for bin/uic and confirm it's from the currect version..

                C:/Qt/5.15.1/mingw81_32/bin/uic.exe

                That is what I found, I guessing it is right version

                1 Reply Last reply
                0
                • Christian EhrlicherC Online
                  Christian EhrlicherC Online
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on last edited by
                  #14

                  As I already said - either there is a uic.exe from Qt4 around or you checked in the generated ui_mainwindow.h (which also then was created with a Qt4 uic) - remove both.

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

                  H 1 Reply Last reply
                  1
                  • Christian EhrlicherC Christian Ehrlicher

                    As I already said - either there is a uic.exe from Qt4 around or you checked in the generated ui_mainwindow.h (which also then was created with a Qt4 uic) - remove both.

                    H Offline
                    H Offline
                    hbatalha
                    wrote on last edited by
                    #15

                    @Christian-Ehrlicher

                    remove both.

                    To remove uic.exe and the generated ui_mainwindow.h???
                    Sorry I don't understand what exactly you are telling me to do.

                    either there is a uic.exe from Qt4 around

                    I would guess no. Is there any possible scenario where you would download compilers only from qt5 and end up with some files from qt4 in them?

                    1 Reply Last reply
                    0
                    • Christian EhrlicherC Online
                      Christian EhrlicherC Online
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on last edited by
                      #16

                      Remove the ui_mainwindow.h - it was created with an uic.exe from Qt4.

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

                      H 1 Reply Last reply
                      0
                      • Christian EhrlicherC Christian Ehrlicher

                        Remove the ui_mainwindow.h - it was created with an uic.exe from Qt4.

                        H Offline
                        H Offline
                        hbatalha
                        wrote on last edited by
                        #17

                        @Christian-Ehrlicher I did that and it solved the first error. But I am still left with the other 2 types of compiling error mentioned in the OP.

                        1 Reply Last reply
                        0
                        • Christian EhrlicherC Online
                          Christian EhrlicherC Online
                          Christian Ehrlicher
                          Lifetime Qt Champion
                          wrote on last edited by
                          #18

                          The documentation to QSpinBox::valueChanged() exectly desribes your problem. Reading docs is sometimes useful...

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

                          H 1 Reply Last reply
                          2
                          • Christian EhrlicherC Christian Ehrlicher

                            The documentation to QSpinBox::valueChanged() exectly desribes your problem. Reading docs is sometimes useful...

                            H Offline
                            H Offline
                            hbatalha
                            wrote on last edited by
                            #19

                            @Christian-Ehrlicher yeah it works, but still... when I compile using Qt 6.0.1 64-bit it works fine, it should work.

                            The problem is not really the compile errors, it is why my code works fine using Qt 6.0.1 64-bit and fails when using Qt 5.15.1/2 32-bit.

                            In the OP I posted 3 errors but it is really 3 type of errors, there are a lot more than just 3 errors all over my project and also there are other type of errors.

                            I tried commenting the lines that threw the errors and it compiled successfully and thus a question arose: will I have to rewrite everything so it can compile in 32-bit?? That doesn't seem right to me, I don't think it is supposed to be this way.

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

                              Because the overloads triggering the compilation error have been either renamed or removed in Qt 6.

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

                              H 1 Reply Last reply
                              0
                              • SGaistS SGaist

                                Because the overloads triggering the compilation error have been either renamed or removed in Qt 6.

                                H Offline
                                H Offline
                                hbatalha
                                wrote on last edited by
                                #21

                                @SGaist Since Qt 6 doesn't yet support 32-bit I should rewrite my code to get it to compile in 32-bit? It will feel like walking backwards though but if that's all to it I don't think I have much of a choice if I want to get my program in 32-bit exe.

                                jsulmJ 1 Reply Last reply
                                0
                                • H hbatalha

                                  @SGaist Since Qt 6 doesn't yet support 32-bit I should rewrite my code to get it to compile in 32-bit? It will feel like walking backwards though but if that's all to it I don't think I have much of a choice if I want to get my program in 32-bit exe.

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

                                  @hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:

                                  Since Qt 6 doesn't yet support 32-bit I should rewrite my code to get it to compile in 32-bit?

                                  You have to compile Qt6 for 32bit and then compile your app using that Qt build.

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

                                  1 Reply Last reply
                                  0
                                  • H hbatalha

                                    @Christian-Ehrlicher yeah it works, but still... when I compile using Qt 6.0.1 64-bit it works fine, it should work.

                                    The problem is not really the compile errors, it is why my code works fine using Qt 6.0.1 64-bit and fails when using Qt 5.15.1/2 32-bit.

                                    In the OP I posted 3 errors but it is really 3 type of errors, there are a lot more than just 3 errors all over my project and also there are other type of errors.

                                    I tried commenting the lines that threw the errors and it compiled successfully and thus a question arose: will I have to rewrite everything so it can compile in 32-bit?? That doesn't seem right to me, I don't think it is supposed to be this way.

                                    JKSHJ Offline
                                    JKSHJ Offline
                                    JKSH
                                    Moderators
                                    wrote on last edited by JKSH
                                    #23

                                    @hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:

                                    will I have to rewrite everything...

                                    No, you don't.

                                    You just need to modify your connect() statements, following the documentation that @Christian-Ehrlicher linked you: https://doc.qt.io/qt-5/qspinbox.html#valueChanged

                                    When your code fully compiles in Qt 5, it will also compile in Qt 6. It will work for 32-bit AND 64-bit.

                                    ...so it can compile in 32-bit??

                                    Please understand: This is not a difference between 32-bit and 64-bit. This is a difference between Qt 5 and Qt 6.

                                    Your current code will have the same errors with Qt 5 64-bit.

                                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                    H 1 Reply Last reply
                                    2
                                    • JKSHJ JKSH

                                      @hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:

                                      will I have to rewrite everything...

                                      No, you don't.

                                      You just need to modify your connect() statements, following the documentation that @Christian-Ehrlicher linked you: https://doc.qt.io/qt-5/qspinbox.html#valueChanged

                                      When your code fully compiles in Qt 5, it will also compile in Qt 6. It will work for 32-bit AND 64-bit.

                                      ...so it can compile in 32-bit??

                                      Please understand: This is not a difference between 32-bit and 64-bit. This is a difference between Qt 5 and Qt 6.

                                      Your current code will have the same errors with Qt 5 64-bit.

                                      H Offline
                                      H Offline
                                      hbatalha
                                      wrote on last edited by
                                      #24

                                      @JKSH

                                      You just need to modify your connect() statements

                                      Yeah I know, when I said "rewrite everything" I meant only the code that is triggering compiler errors. I think I misspoke.

                                      When your code fully compiles in Qt 5, it will also compile in Qt 6. It will work for 32-bit AND 64-bit.
                                      Please understand: This is not a difference between 32-bit and 64-bit. This is a difference between Qt 5 and Qt 6.
                                      Your current code will have the same errors with Qt 5 64-bit.

                                      I am aware of all that, it just feels like walking backwards that's all. Hope the support for 32-bit in Qt 6 starts soon.

                                      J.HilkJ JKSHJ 2 Replies Last reply
                                      0
                                      • H hbatalha

                                        @JKSH

                                        You just need to modify your connect() statements

                                        Yeah I know, when I said "rewrite everything" I meant only the code that is triggering compiler errors. I think I misspoke.

                                        When your code fully compiles in Qt 5, it will also compile in Qt 6. It will work for 32-bit AND 64-bit.
                                        Please understand: This is not a difference between 32-bit and 64-bit. This is a difference between Qt 5 and Qt 6.
                                        Your current code will have the same errors with Qt 5 64-bit.

                                        I am aware of all that, it just feels like walking backwards that's all. Hope the support for 32-bit in Qt 6 starts soon.

                                        J.HilkJ Online
                                        J.HilkJ Online
                                        J.Hilk
                                        Moderators
                                        wrote on last edited by
                                        #25

                                        @hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:

                                        I am aware of all that, it just feels like walking backwards that's all. Hope the support for 32-bit in Qt 6 starts soon.

                                        Unlikely:

                                        This means that we will not have 32bit Windows support available. Additionally, it will no longer be possible to create UWP applications on Windows 10.

                                        If you want 32 bit Qt6, you will have to build Qt6 from sources


                                        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                                        Q: What's that?
                                        A: It's blue light.
                                        Q: What does it do?
                                        A: It turns blue.

                                        H 1 Reply Last reply
                                        1
                                        • J.HilkJ J.Hilk

                                          @hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:

                                          I am aware of all that, it just feels like walking backwards that's all. Hope the support for 32-bit in Qt 6 starts soon.

                                          Unlikely:

                                          This means that we will not have 32bit Windows support available. Additionally, it will no longer be possible to create UWP applications on Windows 10.

                                          If you want 32 bit Qt6, you will have to build Qt6 from sources

                                          H Offline
                                          H Offline
                                          hbatalha
                                          wrote on last edited by hbatalha
                                          #26

                                          @J-Hilk said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:

                                          Unlikely:

                                          ooh too bad then. Does this mean they are discouraging the development of 32-bit programs on windows? Is there any good reason to provide only the 64-bit version of my program.
                                          Edit: From what I gathered providing only the 32-bit is the best option(I might've gotten it wrong though) since it will run happily on both versions so it is not looking clear to me why Qt would discontinue it.

                                          If you want 32 bit Qt6, you will have to build Qt6 from sources

                                          Could you elaborate on that?!

                                          jsulmJ 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