Important: Please read the Qt Code of Conduct -

Qt Source Build Win7: uic.exe not found

  • Hello,

    I have problems in the Qt5.4.1 build on Win7.
    My settings are (Windows7; Mingw64 4.9.2 i686; Python34):

    -> Extract qt-everywhere-opensource-src-5.4.1 in "C:\Qt\QtSRC5.4.1\qt5"

    -> Cmd.exe commands:
    SET _root = C:\Qt\QtSRC5.4.1\qt5 SETPATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;C:\mingw-w64\i686-4.9.2\mingw32\bin;C:\Python34;C:\Qt\QtSRC5.4.1\qt5\qtbase\bin;%PATH%
    SET INCLUDE = C:\mingw-w64\i686-4.9.2\mingw32\i686-w64-mingw32\include
    SET LIB = C:\mingw-w64\i686-4.9.2\mingw32\i686-w64-mingw32\lib
    SET QTDIR = C:\Qt\QtSRC5.4.1\qt5; C:\Qt\QtSRC5.4.1\qt5\qtbase\bin
    SET QMAKESPEC = win32-g ++
    SET _root =

    -> Edit "C:\Qt\QtSRC5.4.1\qt5\qtbase\mkspecs\win32-g ++\qmake.conf":
    "QMAKE_CXXFLAGSC11=-std=c++0x" to "QMAKE_CXXFLAGSC11=-std=gnu++0x"

    -> Configure:
    configure -opensource -debug-and-release -nomake examples -nomake tests -opengl desktop -platform win32-g++ -D __NO_INLINE __

    Run "mingw32-make".
    The compilation follows quiet until the process make the *.ui with uic.exe of the error message:
    'C:\Qt\5.4.1 QtSRC\qt5\qtbase\bin\uic.exe' not found

    By checking Makefile.Debug (Release) files in "uic compiler make_all" have the line:
    "QT_PLUGIN_PATH=/C/Qt/QtSRC5.4.1/qt5/qtbase/pluginsPATH=/C/Qt/QtSRC5.4.1/qt5/qtbase/lib$${PATH:+:$$PATH} 'C:\Qt\QtSRC5.4.1\qt5\qtbase\bin\uic.exe'"

    If you replace this line "QT_PLUGIN_PATH....\bin\uic.exe" for "'C:\Qt\QtSRC5.4.1\qt5\qtbase\bin\uic.exe'" works!!!

    What am I doing wrong?

  • Moderators

    Hi @ReinaldoJr,

    I'm not entirely sure what went wrong in your case, but this is all I needed to do after extracting the source code to C:\Qt\src\5.4.1. No need to set environment variables, no need to edit qmake.conf:

    $> path = %path%;C:\mingw482_32\bin\
    $> cd C:\Qt\src\5.4.1\
    $> configure.bat -prefix "C:/Qt/Custom/5.4.1/mingw482_32" -opensource -confirm-license -nomake examples -nomake tests
    $> mingw32-make -j 5

  • @JKSH ok, thanks for the information

    I'll make a cleanconf and then try as indicated.


  • Moderators

    @ReinaldoJr said:

    I'll make a cleanconf and then try as indicated.

    make confclean doesn't work any more, unfortunately. That's because the source code has been modularized since Qt 4.

    I think you need to delete everything and re-extract your source code. (If you checked out using git, you can call git submodule foreach "git clean -dfx")

Log in to reply