Important: Please read the Qt Code of Conduct -

Six Questions on Compiling Qt for MinGW 64 bit

  • I have been trying to recompile the source code of qt for three days now.
    I've got a win 10 64bit laptop and am trying to build qt which compiles with MinGW 64bit
    I am trying to do a shadow-build from the source in D:/Qt64/qt-source/qt5 into D:/Qt64/qt-build

    Several questions.

    1. in the qt-build directory I call :
      D:/Qt64/qt-source/qt5/configure -prefix . -platform win32-g++ -opengl desktop

    it asks me after 15 minutes if I want commercial or opensource--what should I answer?? This is a hobby, not a commercial endeavour.

    1. I start with cmd.exe and run the qt5vars.bat file to modify the PATH each time I open a new cmd.exe window or bash window.
      It moves along quite nicely in cmd.exe but freezes after about 1-1/2 hours with :

    D:/mingw/64/bin/MinGW32-make -f Makefile.Debug all
    MinGW32-make[4]: Entering directory 'd:/Qt64/qt-build/qtbase/src/widgets'
    /D/Qt64/qt-build/qtbase/src/widgets/ D:/Qt64/qt-source/qt5/qtbase/src/widgets/dialogs/qfiledialog.ui -o .uic/ui_qfiledialog.h
    process_begin: CreateProcess(NULL, /D/Qt64/qt-build/qtbase/src/widgets/ D:/Qt64/qt-source/qt5/qtbase/src/widgets/dialogs/qfiledialog.ui -o .uic/ui_qfiledialog.h, ...) failed.
    make (e=2): The system cannot find the file specified.

    I am in cmd.exe, using the MS designation "D:/Qt64..... etc" Where did this "/D/Qt64.....etc" depiction come from??
    MS cmd.exe doesn't do *.sh shell scripts, does it??

    1. Another time it froze complaining about a missing file .
      GLES2/gl2.h: No such file or directory compilation terminated.

    I restarted config with the -opengl platform option. Is this correct??
    Must I install a 64 bit graphics library or something?

    1. Yet another time it froze at sometime in the night after hours of compiling with
      fatal error: uiviewsettingsinterop.h: No such file or directory

    2. Should I be using a cmd.exe or a bash window started from my D:/MinGW/msys folder?

    3. When this process crashes after several hours and after I stop crying can I restart the config/make/make install routine and with new parameters and will the whole build resume after the point where it crashed...Or must I start over???

  • Lifetime Qt Champion


    1. Open source
    2. You should try with the cmd.exe from your MinGW installation
    3. For GLES you need GLES header and libraries, MinGW provides both for OpenGL, so you can try with this
    4. No idea
    5. Yes
    6. If you reconfigure you should rebuild. If you don't reconfigure no need to rebuild - just continue.

  • Good Answers. This is good to hear..except for item #2
    I was using the microsoft cmd.exe, it's the same as cmd.exe in MinGW, isn't it?
    What is cmd.exe supposed to do with a file ending in 'sh'
    Did you see the mixed notation in that command line?

    /D/Qt64/qt-build/qtbase/src/widgets/ D:/Qt64/qt-source/qt5/qtbase/src/widgets/dialogs/qfiledialog.ui -o .uic/ui_qfiledialog.h

    Isn't this kind of kinky?

  • Lifetime Qt Champion


    Additional useful options: -nomake tests -nomake examples

    Windows's command line is not the same shell as provided by MSys. It can't handle bash script for example.

  • quite true SGaist. Yesterday it took 8 hours before making a mistake.

    FLT_EPSILON was not defined while building svg.

    And I'll use the msys cmd.exe next time.....I've been using

    Next time I'll call the msys cmd.exe directly.

Log in to reply