Important: Please read the Qt Code of Conduct -

Cannot build Qt 4.8.1 using nmake

  • Hello. I'm attempting an out-of-source build of Qt 4.8.1 with a target of visual studio 2010 and failing on two fronts.

    The first problem is that the Makefile is being output to the source directory, not the build directory. A Makefile of some sort is put in the build directory, but it's recursive and just ends up launching nmake processes on itself until I cancel it. I have had this problem randomly with out-of-source builds in the past and the solution is to copy the Makefile it puts in the source directory into the build directory and usually that's sufficient. However now I get a new error:

    @NMAKE : fatal error U1073: don't know how to make 'FORCE'

    The configure line I use for this is:

    @C:\Qt\4.8.1>..\4.8.1-src\configure -debug-and-release -opensource -fast -no-qt3support -platform win32-msvc2010 -qt-zlib -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -no-dsp -no-vcproj -no-incredibuild-xge -no-webkit -mp@

    Picking a line from the Makefile which includes "FORCE" (of which there are many) looks like this:

    @sub-tools-bootstrap-qmake-all: FORCE
    @$(CHK_DIR_EXISTS) src\tools\bootstrap\ $(MKDIR) src\tools\bootstrap
    cd src\tools\bootstrap\ && $(QMAKE) C:\Qt\4.8.1-src\src\tools\bootstrap\ -spec C:\Qt\4.8.1\mkspecs\win32-msvc2010 -o $(MAKEFILE)@

    Any ideas?

  • Haven't tried to build 4.8.1 from Qt's .zip download, but it builds flawlessly from GIT: git://

  • Tried that, and had problems getting the source:

    @> git clone git://
    Cloning into qt...
    [stuff happens]

    cd qt
    git checkout v4.8.1
    warning: unable to unlink config.profiles/symbian: Is a directory
    fatal: cannot create directory at 'config.profiles/symbian': Is a directory@

    I have NFI what state my copy of the repo is in now.

  • I tried again using a different git and it seems to be working now.
    Just one of those things I guess. Consider this resolved for now.

Log in to reply