[Solved] Qt 4.8, MSVC2010, nmake, don't know how to make 'sub-src'

  • Hello,

    I try to compile Qt 4.8.5 on a Windows 7 machine, with VS 2010 SP1, Windows SDK 7.1. I need to build in x64 mode.

    Is this wiki page still accurate? http://qt-project.org/wiki/Building_Qt_Desktop_for_Windows_with_MSVC

    I did:

    got the Qt sources and installes OpenSSL binaries

    set up QTDIR, OPENSSL, PATH, QMAKESPEC (win32-msvc2010)

    added -MP2 option as stated on wiki page

    tried both configure listed below

    nmake sub-src fails with "don't know how to make 'sub-src'"

    What am I missing? Additionnally, am I sure it will perform a x64 build?
    I guess I don't need phonon.
    Thank you for any information.

    configure version 1:
    @configure -release -opensource -shared -ltcg -no-fast -exceptions -accessibility -stl -qt-sql-sqlite -no-qt3support -no-openvg -platform win32-msvc2010 -graphicssystem raster -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -no-dsp -no-vcproj -incredibuild-xge -plugin-manifests -qmake -process -rtti -mmx -3dnow -sse -sse2 -openssl -no-dbus -phonon -phonon-backend -multimedia -audio-backend -webkit -script -scripttools -declarative -arch windows -qt-style-windows -qt-style-windowsxp -qt-style-windowsvista -no-style-plastique -no-style-cleanlooks -no-style-motif -no-style-cde -no-style-windowsce -no-style-windowsmobile -no-style-s60 -native-gestures

    configure version 2:
    @configure -mp -opensource -nomake demos -nomake examples -platform win32-msvc2010

  • Moderators

    Just run nmake, no need for sub-src. If you really want to skip building tools, you can also run this:
    bin\qmake projects.pro QT_BUILD_PARTS="libs"

  • Moderators

    That wiki page looks overly complicated, to be honest. Building Qt is really much easier than that ;)

  • Thanks, nmake alone works better. I intended to build libs then tools anyways.
    I agree, could anyone edit the wiki page? :-)

    But I'm missing something in my PATH or some other setting for headers to be found...
    @c:\qt\qt4.8.5\src\corelib\codecs\qisciicodec_p.h(56) : fatal error C1083: Cannot
    open include file: 'QtCore/qtextcodec.h': No such file or directory@

    I had a look at Qt5 corresponding page:


    I'm currently searching in the forum about this include problem.

  • Moderators

    Doh, even there they put unneeded calls :( You don't need to set any environment variables to be able to build Qt: configure does all this automatically. But it does look much better :)

    I think the best description of the build process is the page for "building from git":http://qt-project.org/wiki/Building_Qt_5_from_Git. But none of that is necessary for you, as you are compiling Qt 4.

    A standard unpack/configure/nmake should do everything without hiccups. I have never seen the error you've got, so sadly I can't help here.

  • Solved. The wiki page really has unaccurate instructions now.
    And I had not clean sources. So I unpacked sources again, ran only
    @configure -mp -opensource -nomake demos -nomake examples -platform win32-msvc2010@ then


    and just have to wait for compilation end :-) I see some warning about data types conversions but it seems it runs smootly.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.