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. I am getting MinGW64 compilation error in Qt.
Forum Updated to NodeBB v4.3 + New Features

I am getting MinGW64 compilation error in Qt.

Scheduled Pinned Locked Moved Unsolved General and Desktop
27 Posts 5 Posters 4.9k 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.
  • hskoglundH Online
    hskoglundH Online
    hskoglund
    wrote on last edited by
    #21

    Hi, try to simplify and uninstall/remove as much as possible from your PC:
    remove MSVC compiler (run MaintenanceTool and uninstall MSVC)
    remove Strawberry
    Try to build an example project from Qt 6.3.2 MinGW in Release mode (not Debug). Does it work?

    yy_pc_programmerY 1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by ChrisW67
      #22

      Other thoughts...

      Remove the WASM version of Qt also.

      Recreate the project definitions:

      • Close out of Qt creator entirely.
      • Locate CMakeLists.txt.user in your source directory
      • Remove or rename it out of the way
      • Start Qt Creator
      • Open Project... and select your CMakeLists.txt file.

      Build any better?

      Do you have more then one CMake installed? Possibly getting confused.

      1 Reply Last reply
      1
      • hskoglundH hskoglund

        Hi, try to simplify and uninstall/remove as much as possible from your PC:
        remove MSVC compiler (run MaintenanceTool and uninstall MSVC)
        remove Strawberry
        Try to build an example project from Qt 6.3.2 MinGW in Release mode (not Debug). Does it work?

        yy_pc_programmerY Offline
        yy_pc_programmerY Offline
        yy_pc_programmer
        wrote on last edited by
        #23

        @hskoglund @ChrisW67 @JonB @Christian-Ehrlicher
        Unfortunately I have other projects that I'm continuing with msvc64. It is not correct for me to remove msvc64. Because my other work is affected. I ran my CMake project, which had this problem, in release mode as you said. The following problems appeared. I don't understand. Thanks.
        Release_Mode_6.png
        Release_Mode2_6.png

        1 Reply Last reply
        0
        • C Offline
          C Offline
          ChrisW67
          wrote on last edited by
          #24

          These error message are because the widget.ui file has not been passed through uic to produce the missing ui_widget.h header and its matching source.

          Is widget.ui listed in PROJECT_SOURCES in your CMakeLists.txt file?
          Is set(CMAKE_AUTOUIC ON) there?

          Does the problem persist if you select Run CMake from the Build menu?

          yy_pc_programmerY 1 Reply Last reply
          0
          • C ChrisW67

            These error message are because the widget.ui file has not been passed through uic to produce the missing ui_widget.h header and its matching source.

            Is widget.ui listed in PROJECT_SOURCES in your CMakeLists.txt file?
            Is set(CMAKE_AUTOUIC ON) there?

            Does the problem persist if you select Run CMake from the Build menu?

            yy_pc_programmerY Offline
            yy_pc_programmerY Offline
            yy_pc_programmer
            wrote on last edited by
            #25

            @ChrisW67 @JonB @Christian-Ehrlicher @hskoglund
            Yeah. There are commands you specified in CMakeList.txt file.
            1-widget_ui_6.png
            2-widget_ui2_6.png

            yy_pc_programmerY 1 Reply Last reply
            0
            • yy_pc_programmerY yy_pc_programmer

              @ChrisW67 @JonB @Christian-Ehrlicher @hskoglund
              Yeah. There are commands you specified in CMakeList.txt file.
              1-widget_ui_6.png
              2-widget_ui2_6.png

              yy_pc_programmerY Offline
              yy_pc_programmerY Offline
              yy_pc_programmer
              wrote on last edited by
              #26

              @ChrisW67 @JonB @Christian-Ehrlicher @hskoglund
              I wonder something. Am I doing something right if I choose CMake as the build system, and run it with msvc64 as well?
              I actually tried this, and it worked. But I'm not sure if it's the right thing? this time "Not found in dynamic library!" didn't give an error. It just gave the error that the widget.ui file does not exist in the problems panel. Do you think I did this right? Thanks!!!
              build_6.png

              JonBJ 1 Reply Last reply
              0
              • yy_pc_programmerY yy_pc_programmer

                @ChrisW67 @JonB @Christian-Ehrlicher @hskoglund
                I wonder something. Am I doing something right if I choose CMake as the build system, and run it with msvc64 as well?
                I actually tried this, and it worked. But I'm not sure if it's the right thing? this time "Not found in dynamic library!" didn't give an error. It just gave the error that the widget.ui file does not exist in the problems panel. Do you think I did this right? Thanks!!!
                build_6.png

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

                @yy_pc_programmer
                Please just post your questions without the @ChrisW67 @JonB @Christian-Ehrlicher @hskoglund stuff every time, allow whichever people to look and answer without calling out every time. Thank you.

                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