Important: Please read the Qt Code of Conduct -

Load(conf.prf) not working anymore in Qt5?

  • Hi guys,

    In Qt4's qmake I was using qmake "load" to ...ahem... load configurations files:


    Now look at this make output generating an error message:

    andrea # euler ~/Desktop/starlab: qmake
    andrea # euler ~/Desktop/starlab: make
    cd core/ && ( test -e Makefile || /usr/local/bin/qmake /Users/andrea/Desktop/starlab/core/ -o Makefile ) && make -f Makefile
    cd starlib/ && ( test -e Makefile || /usr/local/bin/qmake /Users/andrea/Desktop/starlab/core/starlib/ -o Makefile ) && make -f Makefile
    /Users/andrea/Desktop/starlab/core/starlib/ Cannot find feature /Users/andrea/Desktop/starlab/core/starlib/../starlab.prf

    as you can see, the PRF file actually exists.. why is then qmake not able to find it?
    (Note that this software was compiling flawlessly in qt4)

    andrea # euler ~/Desktop/starlab: ll /Users/andrea/Desktop/starlab/core/starlib/../starlab.prf
    -rw-r--r-- 1 andrea staff 7.1K 13 Apr 07:35 /Users/andrea/Desktop/starlab/core/starlib/../starlab.prf


  • Moderators

    Should still work. Have you tried include() instead of load()?

  • that's what a collague of mine suggested. But why is "load" broken? With what did they replace it? What I don't like about include is that in qtcreator all those includes add a file to the project tree as well.

  • Moderators

    Load was never documented as an official qmake function (well, AFAIK), so you can't really blame the devs ;)

  • True, but I am just wondering what they are now using instead. I always found qmake never "well" documented. Working with it when I was assembling the build system made me very frustrated

  • Moderators

    True. Most Qt devs actually dislike qmake, and there are plans to drop it somewhere in the future (they were very close to dumping it for Qt5, in fact!). Perhaps if QBS matures a bit more, a switch will be made.

  • Sierdzio, what were they planning to drop qmake for in Qt5?
    Perhaps even just adopting cmake as a build environment might not be an evil idea, don't you think?

    The only reason for which I didn't adopt cmake myself is that it's not "QtCreator" friendly. I can import a project, but when you do so, it simply gets converted.

  • Moderators

    Because qmake is:

    • ugly and old
    • hard to maintain
    • lacking in features

    There was an extra-long discussion about this about 18 months ago on development ML, or possibly Qt5-feedback at that time. Candidates were mostly cmake, qbs and I think somebody mentioned scons + a few others.

    Here a short answer from Thiago ("link": I think there was another thread on this, but have no time or will to search :)

  • No worries, thanks for the reply. I am looking forward to see how the build system will change :)

Log in to reply