MingW: A lot of warnings + too slow compiling
-
@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.
Any help?
-
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...
-
@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)
-
@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 line1270
and1271
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?
-
Achilles' heel #1 in Linux/gcc: spaces in directories. Not in your build path, but in an include file:
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 :-)
-
@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.
-
@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 usingmingw32-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?
-
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 theINCLUDEPATH += "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.
-
@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
andGCC
on Linux is very close time to build, butMSYS2 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!
-
@hskoglund said in MingW: A lot of warnings + too slow compiling:
QMAKE_CXXFLAGS += -I"C:\Path\Path With Spaces"
@hskoglund you are amazing!
-
Interesting about the compile times.
For another example, I have a project that used to compile in almost 1 hour on MSVC2015 I seem to remember.
Note: there's 2 large .h files that GitLab doesn't like, they can be downloaded here:
http://tripleboot.org/Projects/tctermscales.h.nogit
http://tripleboot.org/Projects/tcterms.h.nogitI just tried now (for all tests: I nuked the build folder and the .pro.user file):
MSVC2019 on WIn10: 19 minutes 43 seconds but with error: TWTCData\tcterms.h.nogit(2826) : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj
Mingw81_32 on Win10: 52 minutes 23 seconds
gcc 9.3.0 on Ubuntu 20.04: 52 minutes 23 seconds
Mingw81_32 on Wine on Ubuntu 20.04: 50 minutes and 54 seconds
MSYS2 Mingw32 on Win10: 1 minute and 54 seconds
Apple clang version 11.0.3 on MacOS 10.15.6: 36 seconds
So in my case, MSYS2 performs rather well (only to be beaten by clang).
@JKSH : so maybe you'll have to drink that beer, because my project actually builds slightly faster on Wine than on a real Windows. Admittedly not much of a difference though...
-
@hskoglund said in MingW: A lot of warnings + too slow compiling:
@JKSH : so maybe you'll have to drink that beer, because my project actually builds slightly faster on Wine than on a real Windows. Admittedly not much of a difference though...
Dagnabbit! :-D
And I definitely wasn't expecting MinGW on Wine to beat native GCC on Ubuntu. Any ideas how that works?
@hskoglund said in MingW: A lot of warnings + too slow compiling:
gcc 9.3.0 on Ubuntu 20.04: 52 minutes 23 seconds
...
MSYS2 Mingw32 on Win10: 1 minute and 54 seconds...or how this works?
-
Well the difference between Wine and native gcc on Ubuntu is only about 4% so it could be due to some caching in Wine.
But as to why MSYS2 mingw and clang just kills the others I don't know. The 2 big .h files have approx. 17000 QStringLiterals each (I get very nice loading/runtime performance using QStringLiterals)
Someday I should test with say 10000 QStringLiterals etc...
P.S. To get MSVC2019 to build, I added to the .pro file for MSVC2019:
win32-msvc: QMAKE_CXXFLAGS += "/bigobj"
and it just finished:
MSVC2019 on Win7: 18 minutes and 46 seconds. Pretty good! -
Since, mingw is a gnu port to windows, It's bound to be slower on Windows than on linux
When I changed ( about 2 years ago ) from mingw to MSVC as the default compiler, my project build time was slashed by a factor of 5, consistently across all projects!
May also be due to all the shady business and corners cut that MSVC does 🤷♂️.
Microsoft does not have a good track record with compilers and compiler safety :)
-
@J-Hilk said in MingW: A lot of warnings + too slow compiling:
from mingw to MSVC as the default compiler, my project build time was slashed by a factor of 5, consistently across all projects!
This is just depressing :( Why does it achieve that? They are compilers. "Cutting corners" could surely not get even vaguely near that. There must be some fundamental architectural difference. I've been meaning to raise a topic about this for a while, I note that MSVC makes heavy use of
.pch
files andgcc
does not seem to do that at all? -
@hskoglund said in MingW: A lot of warnings + too slow compiling:
MSYS2 Mingw32 on Win10: 1 minute and 54 seconds
Wowww! So fast!!
@hskoglund Only to confirm: this test was made using MSYS2 MingW-W64 or (32 bit version)?
I am confused about how your results can be just the reverse of mine. I would expect proportional results, as we are using the same compilers, on the same OS, etc ...If you think there may be another configuration that I can change to try to get your MingW (Win10) build time, please let me know! I can try!
@hskoglund said in MingW: A lot of warnings + too slow compiling:
MSVC2019 on Win7: 18 minutes and 46 seconds. Pretty good!
With this last flag, MSVC2019 is pretty good too!
@J-Hilk said in MingW: A lot of warnings + too slow compiling:
by a factor of 5
Exactly. That's the build time difference that I have in my current project switching between theses 3 compilers.
@JonB said in MingW: A lot of warnings + too slow compiling:
MSVC makes heavy use of .pch files and gcc does not seem to do that at all?
a) Did you mean that MSVC create
*.pch
files automatically? Without an explicit developer setting?b) Even though MSVC does this, in my tests above I always cleaned the build folder completely before recompiling. So there would be no
*.pch
file to optimize compilation time. Right? -
@fem_dev
IIRC, MSVC.pch
generation/usage requires a compiler flag. We used it on our projects, it made a big difference.I assumed
gcc
did not have these, but it now appears I am incorrect --- https://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html. I am surprised, then, since I have not a single example of a Qtgcc
using them. When I would have thought it would be an ideal candidate. Then again, I see https://stackoverflow.com/questions/54727653/why-is-using-precompiled-headers-on-gcc-slower ....It doesn't appear this is factor in your tests.
-
Hi, as I remember .pch files from my MFC days, they saved time when you compiled the same project over and over, but the tests in this topic are more "single-shot" flavored (i.e. you delete the build folder and .pro.user files every time). so they are immaterial here I think.
-
@hskoglund said in MingW: A lot of warnings + too slow compiling:
but the tests in this topic are more "single-shot" flavored (i.e. you delete the build folder and .pro.user files every time). so they are immaterial here I think.
Yes! That's it!