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.1k 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.
  • H Offline
    H Offline
    hbatalha
    wrote on last edited by
    #1

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

    However, after setting up my kit and trying to run the application it produces a lot of errors while building for 64-bit works fine.

    the first error is this one:

    \ui_mainwindow.h:13: error: QtGui/QAction: No such file or directory
    In file included from mainwindow.cpp:2:
    ui_mainwindow.h:13:10: fatal error: QtGui/QAction: No such file or directory
     #include <QtGui/QAction>
              ^~~~~~~~~~~~~~~
    

    Then some errors with connect, like this one:

    connect(ui->to, &QSpinBox::valueChanged, [this]()
        {
            ui->from->setMaximum(ui->to->value());
        });
    

    The code above throws the following error:

    playlistdialog.cpp:39: error: no matching function for call to 'PlaylistDialog::connect(QSpinBox*&, <unresolved overloaded function type>, PlaylistDialog::PlaylistDialog(QString, QString, int, int, int, QWidget*)::<lambda()>)'
    playlistdialog.cpp:39:6: error: no matching function for call to 'PlaylistDialog::connect(QSpinBox*&, <unresolved overloaded function type>, PlaylistDialog::PlaylistDialog(QString, QString, int, int, int, QWidget*)::<lambda()>)'
         });
          ^
    

    There are a couple more errors similar to the one above.

    And then some more similar errors:

    videoFormats = {"mp4"/*, "webm", "flv", "3gp", "avi"*/};
    

    Throws this error:

    \playlistdialog.cpp:65: error: ambiguous overload for 'operator=' (operand types are 'QStringList' and '<brace-enclosed initializer list>')
    playlistdialog.cpp:65:59: error: ambiguous overload for 'operator=' (operand types are 'QStringList' and '<brace-enclosed initializer list>')
         videoFormats = {"mp4"/*, "webm", "flv", "3gp", "avi"*/};
                                                               ^
    

    I can't see the reason for these 3 type of errors since they are working fine in Qt 5.15.2 MinGW 64-bit.

    Any idea?? Thanks!!

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

      Hi,

      Are you using a 32bit build of Qt ?

      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
      • Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @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

        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
        • SGaistS SGaist

          Hi,

          Are you using a 32bit build of Qt ?

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

          @SGaist

          Screenshot_4.png

          Christian EhrlicherC 1 Reply Last reply
          0
          • H hbatalha

            @SGaist

            Screenshot_4.png

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

            @hbatalha And what do you want to tell with us? It's completely irrelevant what Qt version or what else your IDE is using...

            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

              @hbatalha And what do you want to tell with us? It's completely irrelevant what Qt version or what else your IDE is using...

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

              @Christian-Ehrlicher Sorry, where can I find the info you requested me?

              1 Reply Last reply
              0
              • 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 Offline
                              Christian EhrlicherC Offline
                              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 Offline
                                  Christian EhrlicherC Offline
                                  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 Offline
                                      Christian EhrlicherC Offline
                                      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

                                          • Login

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