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. MingW: A lot of warnings + too slow compiling
Forum Updated to NodeBB v4.3 + New Features

MingW: A lot of warnings + too slow compiling

Scheduled Pinned Locked Moved Unsolved General and Desktop
38 Posts 6 Posters 11.8k Views 1 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.
  • J jsulm
    16 Jul 2020, 13:36

    @fem_dev said in MingW: A lot of warnings + too slow compiling:

    is there a way to use my installed GCC-10.1.0 inside Qt Creator IDE?

    Normally it is better to use MinGW provided through Qt installer as that one is tested. Especially a different compiler version can be problematic.

    F Offline
    F Offline
    fem_dev
    wrote on 16 Jul 2020, 14:32 last edited by
    #5

    @jsulm said in MingW: A lot of warnings + too slow compiling:

    Normally it is better to use MinGW provided through Qt installer as that one is tested. Especially a different compiler version can be problematic

    Yes @jsulm ...I think so...
    But as you can see, both MingW versions are taking a long time to compile. And GCC-10.1 crashs my application when this app starts.

    Any ideas?

    1 Reply Last reply
    0
    • H Online
      H Online
      hskoglund
      wrote on 16 Jul 2020, 14:45 last edited by
      #6

      Hi, about the crashing, it could be due to the gcc version in Qt/MinGW and gcc in MSYS2 have different runtimes (different toolchains or different .dlls), what I mean: your main.cpp is compiled with the MSYS2 version but the Qt .dlls like Qt5Core.dll etc. are compiled with Qt/MinGW.

      But it should be possible to build a custom version of Qt 5.15.0's .dlls using that MSYS2 toolchain.

      F 1 Reply Last reply 16 Jul 2020, 15:04
      2
      • H hskoglund
        16 Jul 2020, 14:45

        Hi, about the crashing, it could be due to the gcc version in Qt/MinGW and gcc in MSYS2 have different runtimes (different toolchains or different .dlls), what I mean: your main.cpp is compiled with the MSYS2 version but the Qt .dlls like Qt5Core.dll etc. are compiled with Qt/MinGW.

        But it should be possible to build a custom version of Qt 5.15.0's .dlls using that MSYS2 toolchain.

        F Offline
        F Offline
        fem_dev
        wrote on 16 Jul 2020, 15:04 last edited by fem_dev
        #7

        @hskoglund Thank you for the explanation.

        May be, the crash cause is that you said. I will think about it. Thank you.

        Even if the crash problem is the incompatibility of Qt's internal * .dll's, there is still a question of the reasons behind the items below:

        a) Both official Qt MingW 8.1 and MSYS2 GCC 10.1 compile time are 30x SLOWER than GCC 9.3 on Linux or MSVC 2019 on Windows 10 x64
        b) Offical Qt MingW 8.1 are given to my 10.000 warning messages at compile time about internal Qt files. (Look the image in the first post above)
        c) How can I use some version of GCC with Qt Creator 4.12.4 on Windows 10 x64 without theses 2 problems above.

        Obs.: I need to use GCC because I have to integrate my custom old Fortran libraries with my new Qt C++ application.
        Theses Fortran libraries were compiled using gfortran 9.3.0.
        So the C/C++ compatible compiler is GCC. I can't do it using MSVC, because I don't have the Intel Fortran Compiler.

        I appreciate any help!

        1 Reply Last reply
        1
        • H Online
          H Online
          hskoglund
          wrote on 16 Jul 2020, 15:44 last edited by hskoglund
          #8

          How you tried if Qt Creator available inside MSYS2 makes more speedy compilations? Tto install the 64-bit, try this on a MSYS2 prompt:

          pacman -S mingw-w64-x86_64-qt-creator
          

          Previously I tested 32-bit Qt Creator, works fine, screenshot:

          Screenshot 2020-07-16 at 17.42.28.png

          Edit: more about Qt in MSYS2 here

          F 1 Reply Last reply 16 Jul 2020, 17:08
          0
          • H hskoglund
            16 Jul 2020, 15:44

            How you tried if Qt Creator available inside MSYS2 makes more speedy compilations? Tto install the 64-bit, try this on a MSYS2 prompt:

            pacman -S mingw-w64-x86_64-qt-creator
            

            Previously I tested 32-bit Qt Creator, works fine, screenshot:

            Screenshot 2020-07-16 at 17.42.28.png

            Edit: more about Qt in MSYS2 here

            F Offline
            F Offline
            fem_dev
            wrote on 16 Jul 2020, 17:08 last edited by fem_dev
            #9

            @hskoglund thank you for your help.

            I did what you said:

            pacman -S mingw-w64-x86_64-qt-creator
            

            This command installed a MingW-64 version of:

            • Assistant 5.15
            • Designer 5.15
            • Linguist 5.15
            • Qt 5.15
              As you can see in my Start Menu below:
              Start Menu.png

            But it does not installed the Qt Creator IDE build from GCC like your image above.
            So, my Qt Creator IDE is still MSVC:

            Qt_creator_msvc.png

            Is that right?

            @hskoglund said in MingW: A lot of warnings + too slow compiling:

            How you tried if Qt Creator available inside MSYS2 makes more speedy compilations?

            In my Windows 10 machine I have 3 Qt configurations installed:

            • MSVC 2019
            • Official Qt MingW-W64 8.1
            • MSYS2 MingW-W64 (GCC 10.1.0)

            Inside Qt Creator IDE, I'm measuring the compilation time just switching between theses 3 configs.
            a) With MSVC, my project builds in 7 seconds. (no warnings, no errors).
            b) With MingW 8.1 or MingW (GCC 10.1) the same project build in 4 or 5 MINUTES.

            Compilers.png

            c) I tested the same project in another machine running Ubuntu 20.04 with GCC 9.3.0. The complation time is 7 seconds too. No warnings. No errors.

            Just MingW-W64 (Qt official and MSYS2) are slow.

            1 Reply Last reply
            0
            • H Online
              H Online
              hskoglund
              wrote on 16 Jul 2020, 18:16 last edited by
              #10

              Re. 64-bit Qt Creator in MSYS2, it's there alright (I didn't know the MSYS2 Qt stuff can be visible in the Windows 10 Start Menu)
              Anway start a 64-bit MSYS2 prompt: c:\msys64\mingw64.exe
              Then inside that just type: qtcreator

              BTW: got another (crazy?) idea, you could try using Wine in your Ubuntu 20.04 to install and run the normal Windows Qt MinGW::
              Screenshot 2020-07-16 at 20.08.00.png

              Perhaps running under Wine will speed your compilation :-)

              F J 2 Replies Last reply 16 Jul 2020, 19:26
              0
              • H hskoglund
                16 Jul 2020, 18:16

                Re. 64-bit Qt Creator in MSYS2, it's there alright (I didn't know the MSYS2 Qt stuff can be visible in the Windows 10 Start Menu)
                Anway start a 64-bit MSYS2 prompt: c:\msys64\mingw64.exe
                Then inside that just type: qtcreator

                BTW: got another (crazy?) idea, you could try using Wine in your Ubuntu 20.04 to install and run the normal Windows Qt MinGW::
                Screenshot 2020-07-16 at 20.08.00.png

                Perhaps running under Wine will speed your compilation :-)

                F Offline
                F Offline
                fem_dev
                wrote on 16 Jul 2020, 19:26 last edited by
                #11

                @hskoglund thank you!

                So I opened the Qt Creator IDE using MSYS2 prompt:

                qtcreator
                

                It open the correct on Qt Creator IDE (GCC 10.1.0 based):
                Qt2.png

                Look in: Tools -> Options -> Kits
                The original MSYS2 MingW-W64 Qt Configuration (GCC based)
                config2.png

                After that, I right clicked in my project -> Clean
                After that, I clicked on build button (bottom left hammer)

                During the compile process, I got this single error message:

                [Makefile.Debug:1271: debug/moc_app.cpp] Error 1
                

                Obs.: My Qt GUI application is called "App"

                Could you help me?

                1 Reply Last reply
                0
                • H Online
                  H Online
                  hskoglund
                  wrote on 16 Jul 2020, 19:38 last edited by
                  #12

                  Hmm, maybe first check that the toolchain is up to scratch, click New to create a vanilla Untitled widget app, build it with MSYS2 MinGW-64 compiler and see that it starts ok.

                  Also, try with deleting your build directory. (it should be called
                  build-app-Desktop_Qt_MinGW_w64_64bit_MSYS2-Debug

                  F 1 Reply Last reply 16 Jul 2020, 20:02
                  0
                  • H hskoglund
                    16 Jul 2020, 19:38

                    Hmm, maybe first check that the toolchain is up to scratch, click New to create a vanilla Untitled widget app, build it with MSYS2 MinGW-64 compiler and see that it starts ok.

                    Also, try with deleting your build directory. (it should be called
                    build-app-Desktop_Qt_MinGW_w64_64bit_MSYS2-Debug

                    F Offline
                    F Offline
                    fem_dev
                    wrote on 16 Jul 2020, 20:02 last edited by
                    #13

                    @hskoglund
                    I close all projects....and I create a new C++ Qt Widget Application.
                    It compile and run Ok! No warnings, no errors. The compile time was fast, but was just a single blank window.

                    After that, I deleted the build-app folder and cleaned my trash.
                    After that, I deleted the app.pro.user from the application folder.

                    So I my project again with Qt (GCC based) it automatically setup the Desktop Qt MingW-w64 64 bits(MSYS2) config (as the same of the image above.

                    I just click in the Qt Creator IDE build buttom.
                    It start to build... but I got the same error message:

                    [Makefile.Debug:1271: debug/moc_app.cpp] Error 1
                    

                    Any ideas?

                    1 Reply Last reply
                    0
                    • H Online
                      H Online
                      hskoglund
                      wrote on 16 Jul 2020, 20:23 last edited by
                      #14

                      Hmm, do you have any spaces in your build path? e.g.
                      C:\Users\My Name\....
                      .. . . . . ^

                      F 1 Reply Last reply 16 Jul 2020, 20:30
                      0
                      • H hskoglund
                        16 Jul 2020, 20:23

                        Hmm, do you have any spaces in your build path? e.g.
                        C:\Users\My Name\....
                        .. . . . . ^

                        F Offline
                        F Offline
                        fem_dev
                        wrote on 16 Jul 2020, 20:30 last edited by
                        #15

                        @hskoglund No...

                        Here is my build path:

                        C:\Users\VM\Desktop\build-rotortest-Desktop_Qt_MinGW_w64_64bit_MSYS2-Debug
                        

                        To be more clear: My full project is called "Rotortest". Inside of it, I have a single sub project called "App".

                        The source and build directories are in my Desktop.

                        proj.png

                        Any help?

                        1 Reply Last reply
                        0
                        • H Online
                          H Online
                          hskoglund
                          wrote on 16 Jul 2020, 20:48 last edited by hskoglund
                          #16

                          Well something's wrong with the moc commandline in the QMake file Makefile.debug, it says above line 1271 but the actual moc command line is something like:

                              C:/msys64/mingw64/bin/moc.exe
                          /C/msys64/mingw64/bin/moc.exe $(DEFINES) --include C:/Users/VM/Desktop/... long line....
                          

                          Could you open the Makefile.Debug file in your build folder (C:\Users\VM\Desktop\build-rotortest-Desktop_Qt_MinGW_w64_64bit_MSYS2-Debug) and look for lines like those 2 above?

                          Edit: finding the error might be easier if you attempt to build outside of Qt Creator:
                          start MSYS2 mingw64 cmd window and type:

                          cd /c/Users/VM/Desktop/build-rotortest-Desktop_Qt_MinGW_w64_64bit_MSYS2-Debug
                          make
                          

                          Then paste the output here...

                          F 1 Reply Last reply 16 Jul 2020, 22:58
                          0
                          • H hskoglund
                            16 Jul 2020, 18:16

                            Re. 64-bit Qt Creator in MSYS2, it's there alright (I didn't know the MSYS2 Qt stuff can be visible in the Windows 10 Start Menu)
                            Anway start a 64-bit MSYS2 prompt: c:\msys64\mingw64.exe
                            Then inside that just type: qtcreator

                            BTW: got another (crazy?) idea, you could try using Wine in your Ubuntu 20.04 to install and run the normal Windows Qt MinGW::
                            Screenshot 2020-07-16 at 20.08.00.png

                            Perhaps running under Wine will speed your compilation :-)

                            J Offline
                            J Offline
                            JKSH
                            Moderators
                            wrote on 16 Jul 2020, 22:23 last edited by
                            #17

                            @hskoglund said in MingW: A lot of warnings + too slow compiling:

                            Perhaps running under Wine will speed your compilation :-)

                            I would need a beer if that were true (and I don't even drink alcohol)

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

                            1 Reply Last reply
                            3
                            • H hskoglund
                              16 Jul 2020, 20:48

                              Well something's wrong with the moc commandline in the QMake file Makefile.debug, it says above line 1271 but the actual moc command line is something like:

                                  C:/msys64/mingw64/bin/moc.exe
                              /C/msys64/mingw64/bin/moc.exe $(DEFINES) --include C:/Users/VM/Desktop/... long line....
                              

                              Could you open the Makefile.Debug file in your build folder (C:\Users\VM\Desktop\build-rotortest-Desktop_Qt_MinGW_w64_64bit_MSYS2-Debug) and look for lines like those 2 above?

                              Edit: finding the error might be easier if you attempt to build outside of Qt Creator:
                              start MSYS2 mingw64 cmd window and type:

                              cd /c/Users/VM/Desktop/build-rotortest-Desktop_Qt_MinGW_w64_64bit_MSYS2-Debug
                              make
                              

                              Then paste the output here...

                              F Offline
                              F Offline
                              fem_dev
                              wrote on 16 Jul 2020, 22:58 last edited by
                              #18

                              @hskoglund said in MingW: A lot of warnings + too slow compiling:

                              finding the error might be easier if you attempt to build outside of Qt Creator:

                              What I did:
                              1- In Qt Creator IDE, right-clicked in my project "rotortest" -> Clean
                              2- Close Qt Creator IDE
                              3- Opened MSYS2 Mingw64 Prompt and go to the build folder using:

                              cd /c/Users/VM/Desktop/build-rotortest-Desktop_Qt_MinGW_w64_64bit_MSYS2-Debug
                              

                              4- Typed: mingw32-make.exe

                              $ mingw32-make.exe
                              cd App/ && ( test -e Makefile || C:/msys64/mingw64/bin/qmake.exe -o Makefile C:/Users/VM/Desktop/rotortest/App/App.pro -spec win32-g++ CONFIG+=debug CONFIG+=qml_debug ) && C:/msys64/mingw64/bin/mingw32-make.exe -f Makefile
                              mingw32-make[1]: Entering directory 'C:/Users/VM/Desktop/build-rotortest-Desktop_Qt_MinGW_w64_64bit_MSYS2-Debug/App'
                              C:/msys64/mingw64/bin/mingw32-make.exe -f Makefile.Debug
                              mingw32-make[2]: Entering directory 'C:/Users/VM/Desktop/build-rotortest-Desktop_Qt_MinGW_w64_64bit_MSYS2-Debug/App'
                              /C/msys64/mingw64/bin/uic.exe ../../rotortest/App/app.ui -o ui_app.h
                              /C/msys64/mingw64/bin/uic.exe ../../rotortest/App/custom_widget/value_unit.ui -o ui_value_unit.h
                              /C/msys64/mingw64/bin/uic.exe ../../rotortest/App/form/form_assembly.ui -o ui_form_assembly.h
                              /C/msys64/mingw64/bin/uic.exe ../../rotortest/App/form/form_excitation.ui -o ui_form_excitation.h
                              /C/msys64/mingw64/bin/uic.exe ../../rotortest/App/form/form_job.ui -o ui_form_job.h
                              /C/msys64/mingw64/bin/uic.exe ../../rotortest/App/form/form_library.ui -o ui_form_library.h
                              /C/msys64/mingw64/bin/uic.exe ../../rotortest/App/form/form_material_elastic.ui -o ui_form_material_elastic.h
                              /C/msys64/mingw64/bin/uic.exe ../../rotortest/App/form/form_material_fluid.ui -o ui_form_material_fluid.h
                              /C/msys64/mingw64/bin/uic.exe ../../rotortest/App/form/form_part.ui -o ui_form_part.h
                              /C/msys64/mingw64/bin/uic.exe ../../rotortest/App/plot.ui -o ui_plot.h
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/table.o ../../rotortest/App/custom_widget/table.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/value_unit.o ../../rotortest/App/custom_widget/value_unit.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/form_assembly.o ../../rotortest/App/form/form_assembly.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/form_excitation.o ../../rotortest/App/form/form_excitation.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/form_job.o ../../rotortest/App/form/form_job.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/form_library.o ../../rotortest/App/form/form_library.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/form_material_elastic.o ../../rotortest/App/form/form_material_elastic.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/form_material_fluid.o ../../rotortest/App/form/form_material_fluid.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/form_part.o ../../rotortest/App/form/form_part.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/main.o ../../rotortest/App/main.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/app.o ../../rotortest/App/app.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/density.o ../../rotortest/App/material/density.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/material.o ../../rotortest/App/material/material.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/viscosity.o ../../rotortest/App/material/viscosity.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/step_density.o ../../rotortest/App/step/step_density.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/step_viscosity.o ../../rotortest/App/step/step_viscosity.cpp
                              g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../../rotortest/App -I. -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -I../../rotortest/App/third-party/gsl -I../../rotortest/App/third-party/gsl -isystem C:/msys64/mingw64/include/QtWidgets -isystem C:/msys64/mingw64/include/QtGui -isystem C:/msys64/mingw64/include/QtCore -Idebug -I. -I/include -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++  -o debug/update_project.o ../../rotortest/App/update_project.cpp
                              g++ -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -dM -E -o debug/moc_predefs.h C:/msys64/mingw64/share/qt5/mkspecs/features/data/dummy.cpp
                              /C/msys64/mingw64/bin/moc.exe -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN --include C:/Users/VM/Desktop/build-rotortest-Desktop_Qt_MinGW_w64_64bit_MSYS2-Debug/App/debug/moc_predefs.h -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++ -IC:/Users/VM/Desktop/rotortest/App -I'C:/Program Files/HDF_Group/HDF5/1.12.0/include' -IC:/Users/VM/Desktop/rotortest/App/third-party/gsl -IC:/Users/VM/Desktop/rotortest/App/third-party/gsl -IC:/msys64/mingw64/include/QtWidgets -IC:/msys64/mingw64/include/QtGui -IC:/msys64/mingw64/include/QtCore -I. -IC:/msys64/mingw64/include/c++/10.1.0 -IC:/msys64/mingw64/include/c++/10.1.0/x86_64-w64-mingw32 -IC:/msys64/mingw64/include/c++/10.1.0/backward -IC:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.1.0/include -IC:/msys64/mingw64/include -IC:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.1.0/include-fixed -IC:/msys64/mingw64/x86_64-w64-mingw32/include ../../rotortest/App/app.h -o debug/moc_app.cpp
                              Usage: C:\msys64\mingw64\bin\moc.exe [options] [header-file] [@option-file] [MOC generated json file]
                              Qt Meta Object Compiler version 67 (Qt 5.15.0)
                              
                              Options:
                                -?, -h, --help                    Displays help on commandline options.
                                --help-all                        Displays help including Qt specific
                                                                  options.
                                -v, --version                     Displays version information.
                                -o <file>                         Write output to file rather than stdout.
                                -I <dir>                          Add dir to the include path for header
                                                                  files.
                                -F <framework>                    Add Mac framework to the include path for
                                                                  header files.
                                -E                                Preprocess only; do not generate meta
                                                                  object code.
                                -D <macro[=def]>                  Define macro, with optional definition.
                                -U <macro>                        Undefine macro.
                                -M <key=value>                    Add key/value pair to plugin meta data
                                --compiler-flavor <flavor>        Set the compiler flavor: either "msvc" or
                                                                  "unix".
                                -i                                Do not generate an #include statement.
                                -p <path>                         Path prefix for included file.
                                -f <file>                         Force #include <file> (overwrite default).
                                -b <file>                         Prepend #include <file> (preserve default
                                                                  include).
                                --include <file>                  Parse <file> as an #include before the main
                                                                  source(s).
                                -n <which>                        Do not display notes (-nn) or warnings
                                                                  (-nw). Compatibility option.
                                --no-notes                        Do not display notes.
                                --no-warnings                     Do not display warnings (implies
                                                                  --no-notes).
                                --ignore-option-clashes           Ignore all options that conflict with
                                                                  compilers, like -pthread conflicting with
                                                                  moc's -p option.
                                --output-json                     In addition to generating C++ code, create
                                                                  a machine-readable JSON file in a file that
                                                                  matches the output file and an extra .json
                                                                  extension.
                                --collect-json                    Instead of processing C++ code, collect
                                                                  previously generated JSON output into a
                                                                  single file.
                                --output-dep-file                 Output a Make-style dep file for build
                                                                  system consumption.
                                --dep-file-path <file>            Path where to write the dep file.
                                --dep-file-rule-name <rule name>  The rule name (first line) of the dep file.
                              
                              Arguments:
                                [header-file]                     Header file to read from, otherwise stdin.
                                [@option-file]                    Read additional options from option-file.
                                [MOC generated json file]         MOC generated json output
                              moc: Too many input files specified: 'Files/HDF_Group/HDF5/1.12.0/include' '../../rotortest/App/app.h'
                              mingw32-make[2]: *** [Makefile.Debug:1271: debug/moc_app.cpp] Error 1
                              mingw32-make[2]: Leaving directory 'C:/Users/VM/Desktop/build-rotortest-Desktop_Qt_MinGW_w64_64bit_MSYS2-Debug/App'
                              mingw32-make[1]: *** [Makefile:45: debug] Error 2
                              mingw32-make[1]: Leaving directory 'C:/Users/VM/Desktop/build-rotortest-Desktop_Qt_MinGW_w64_64bit_MSYS2-Debug/App'
                              mingw32-make: *** [Makefile:50: sub-App-make_first] Error 2
                              

                              I went to the Makefile.Debug.
                              Here is the line 1270 and 1271

                              C:/msys64/mingw64/bin/moc.exe
                              	/C/msys64/mingw64/bin/moc.exe $(DEFINES) --include C:/Users/VM/Desktop/build-rotortest-Desktop_Qt_MinGW_w64_64bit_MSYS2-Debug/App/debug/moc_predefs.h -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++ -IC:/Users/VM/Desktop/rotortest/App -I'C:/Program Files/HDF_Group/HDF5/1.12.0/include' -IC:/Users/VM/Desktop/rotortest/App/third-party/gsl -IC:/Users/VM/Desktop/rotortest/App/third-party/gsl -IC:/msys64/mingw64/include/QtWidgets -IC:/msys64/mingw64/include/QtGui -IC:/msys64/mingw64/include/QtCore -I. -IC:/msys64/mingw64/include/c++/10.1.0 -IC:/msys64/mingw64/include/c++/10.1.0/x86_64-w64-mingw32 -IC:/msys64/mingw64/include/c++/10.1.0/backward -IC:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.1.0/include -IC:/msys64/mingw64/include -IC:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/10.1.0/include-fixed -IC:/msys64/mingw64/x86_64-w64-mingw32/include ../../rotortest/App/app.h -o debug/moc_app.cpp
                              

                              Any help?

                              1 Reply Last reply
                              0
                              • H Online
                                H Online
                                hskoglund
                                wrote on 16 Jul 2020, 23:14 last edited by hskoglund
                                #19

                                Achilles' heel #1 in Linux/gcc: spaces in directories. Not in your build path, but in an include file:
                                Screenshot 2020-07-17 at 01.10.45.png

                                Edit: there's a quick-and-dirty solution (very short-term, will not survive a qmake), open that Makefile.Debug file in an editor and change line 1271 so that the problematic include directory is surrounded by double quotes (not single), i.e. so it looks like this extract:

                                ...Desktop/rotortest/App -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -IC:/Users/VM/Desktop/rotortest/App/thir...
                                

                                Again: very short-term solution :-)

                                F 1 Reply Last reply 16 Jul 2020, 23:53
                                2
                                • H hskoglund
                                  16 Jul 2020, 23:14

                                  Achilles' heel #1 in Linux/gcc: spaces in directories. Not in your build path, but in an include file:
                                  Screenshot 2020-07-17 at 01.10.45.png

                                  Edit: there's a quick-and-dirty solution (very short-term, will not survive a qmake), open that Makefile.Debug file in an editor and change line 1271 so that the problematic include directory is surrounded by double quotes (not single), i.e. so it looks like this extract:

                                  ...Desktop/rotortest/App -I"C:/Program Files/HDF_Group/HDF5/1.12.0/include" -IC:/Users/VM/Desktop/rotortest/App/thir...
                                  

                                  Again: very short-term solution :-)

                                  F Offline
                                  F Offline
                                  fem_dev
                                  wrote on 16 Jul 2020, 23:53 last edited by
                                  #20

                                  @hskoglund Wowwww!!! Thank you so much!!

                                  I saw that this single quotes + blank spaces problem is very present in a lot of places of my Makefile.Debug.

                                  @hskoglund said in MingW: A lot of warnings + too slow compiling:

                                  Again: very short-term solution :-)

                                  Is there a way to modify my rotortest.pro or any Qt Creator IDE configuration to resolve all occurrences at the same time?

                                  Thank you so much @hskoglund ! You are the best!

                                  Fixing this located problem, I will check if the compilation time is Ok or not.

                                  F 1 Reply Last reply 17 Jul 2020, 01:38
                                  0
                                  • F fem_dev
                                    16 Jul 2020, 23:53

                                    @hskoglund Wowwww!!! Thank you so much!!

                                    I saw that this single quotes + blank spaces problem is very present in a lot of places of my Makefile.Debug.

                                    @hskoglund said in MingW: A lot of warnings + too slow compiling:

                                    Again: very short-term solution :-)

                                    Is there a way to modify my rotortest.pro or any Qt Creator IDE configuration to resolve all occurrences at the same time?

                                    Thank you so much @hskoglund ! You are the best!

                                    Fixing this located problem, I will check if the compilation time is Ok or not.

                                    F Offline
                                    F Offline
                                    fem_dev
                                    wrote on 17 Jul 2020, 01:38 last edited by
                                    #21

                                    @fem_dev said in MingW: A lot of warnings + too slow compiling:

                                    I saw that this single quotes + blank spaces problem is very present in a lot of places of my Makefile.Debug.

                                    I manually replaced all occurrences of this problem in the Makefile.debug and compile it using mingw32-make.exe.
                                    It compiles ok! No warnings and no errors!!! Build and run with success!!

                                    First problem: Fixed!!

                                    Lets go to the final problem: The slower time to compile using MingW version.

                                    Now, to measure how long each compiler takes to build my project, I have to be able to clean main build folder and build again switching between theses compilers inside the Qt Creator IDE:

                                    • MingW-w64 (GCC 10.1.0) (the last one)
                                    • MSVC 2019
                                    • GCC 9.3 (On my Ubuntu 20.04 machine - same hardware)

                                    To do that, I need to be possible to clean up the build folder and rebuild all without fix the Makefile.debug manually.

                                    Is there a way to config Qt Creator IDE (GCC Based) to generate only include lines with double quotes?

                                    How can I do it?

                                    F 1 Reply Last reply 17 Jul 2020, 02:10
                                    0
                                    • H Online
                                      H Online
                                      hskoglund
                                      wrote on 17 Jul 2020, 02:10 last edited by
                                      #22

                                      Trying to add double quotes to those INCLUDEPATH += ... lines in the .pro file is almost impossible, because of the heavy munging that MSYS2 does (replaces all \ with / etc.)

                                      But fear not, there's a sneaky way to get those double quotes to the command line:
                                      in the .pro file, it involves replacing all the

                                      INCLUDEPATH += "C:\Path\Path With Spaces"
                                      

                                      with

                                      QMAKE_CXXFLAGS += -I\"C:\Path\Path With Spaces\"
                                      

                                      Note: you only need to this replacement for the INCLUDEPATH s that have spaces in them.

                                      F 1 Reply Last reply 17 Jul 2020, 02:15
                                      1
                                      • F fem_dev
                                        17 Jul 2020, 01:38

                                        @fem_dev said in MingW: A lot of warnings + too slow compiling:

                                        I saw that this single quotes + blank spaces problem is very present in a lot of places of my Makefile.Debug.

                                        I manually replaced all occurrences of this problem in the Makefile.debug and compile it using mingw32-make.exe.
                                        It compiles ok! No warnings and no errors!!! Build and run with success!!

                                        First problem: Fixed!!

                                        Lets go to the final problem: The slower time to compile using MingW version.

                                        Now, to measure how long each compiler takes to build my project, I have to be able to clean main build folder and build again switching between theses compilers inside the Qt Creator IDE:

                                        • MingW-w64 (GCC 10.1.0) (the last one)
                                        • MSVC 2019
                                        • GCC 9.3 (On my Ubuntu 20.04 machine - same hardware)

                                        To do that, I need to be possible to clean up the build folder and rebuild all without fix the Makefile.debug manually.

                                        Is there a way to config Qt Creator IDE (GCC Based) to generate only include lines with double quotes?

                                        How can I do it?

                                        F Offline
                                        F Offline
                                        fem_dev
                                        wrote on 17 Jul 2020, 02:10 last edited by fem_dev
                                        #23

                                        @fem_dev said in MingW: A lot of warnings + too slow compiling:

                                        Lets go to the final problem: The slower time to compile using MingW version.

                                        UPDATE 1

                                        I move my HDF5 dependency libray folder to my HD root on C:\. So it fix the "single quotes" problem and Qt Creator IDE can build my project from scratch now and I can switch between the compilers.

                                        Time to build my project:

                                        • MSYS MingW-w64 GCC 10.1.0 based: 70 seconds
                                        • MSVC 2019: 16 seconds
                                        • GCC 9.3: 13 seconds (On my Ubuntu 20.04 machine)

                                        So, MSVC and GCC on Linux is very close time to build, but MSYS2 MingW-w64 is 5x slower using the same IDE version in the same machine.

                                        Using:

                                        • Qt Creator IDE 4.12.4
                                        • Qt 5.15

                                        My machines hardware are:

                                        • Intel Core i7 6 Cores 12 Threads 2.2GHz
                                        • 32GB RAM
                                        • 1TB NVMe storage

                                        Is there a way to speed up the MSYS2 MingW-w64 compiler?

                                        Obs.: Just to be clear, all 3 compilers are building my project without any warning or error messages!

                                        1 Reply Last reply
                                        0
                                        • H hskoglund
                                          17 Jul 2020, 02:10

                                          Trying to add double quotes to those INCLUDEPATH += ... lines in the .pro file is almost impossible, because of the heavy munging that MSYS2 does (replaces all \ with / etc.)

                                          But fear not, there's a sneaky way to get those double quotes to the command line:
                                          in the .pro file, it involves replacing all the

                                          INCLUDEPATH += "C:\Path\Path With Spaces"
                                          

                                          with

                                          QMAKE_CXXFLAGS += -I\"C:\Path\Path With Spaces\"
                                          

                                          Note: you only need to this replacement for the INCLUDEPATH s that have spaces in them.

                                          F Offline
                                          F Offline
                                          fem_dev
                                          wrote on 17 Jul 2020, 02:15 last edited by
                                          #24

                                          @hskoglund said in MingW: A lot of warnings + too slow compiling:

                                          QMAKE_CXXFLAGS += -I"C:\Path\Path With Spaces"

                                          @hskoglund you are amazing!

                                          1 Reply Last reply
                                          0

                                          14/38

                                          16 Jul 2020, 20:23

                                          • Login

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