Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

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

    General and Desktop
    2
    9
    2861
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tallia1 last edited by

      Hi guys,

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

      @
      load(/path/to/conf.prf)
      @

      Now look at this make output generating an error message:

      @
      andrea # euler ~/Desktop/starlab: qmake starlab_mini.pro
      andrea # euler ~/Desktop/starlab: make
      cd core/ && ( test -e Makefile || /usr/local/bin/qmake /Users/andrea/Desktop/starlab/core/core.pro -o Makefile ) && make -f Makefile
      cd starlib/ && ( test -e Makefile || /usr/local/bin/qmake /Users/andrea/Desktop/starlab/core/starlib/starlib.pro -o Makefile ) && make -f Makefile
      /Users/andrea/Desktop/starlab/core/starlib/starlib.pro:1: 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
      @

      Cheers

      1 Reply Last reply Reply Quote 0
      • sierdzio
        sierdzio Moderators last edited by

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

        (Z(:^

        1 Reply Last reply Reply Quote 1
        • T
          tallia1 last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • sierdzio
            sierdzio Moderators last edited by

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

            (Z(:^

            1 Reply Last reply Reply Quote 0
            • T
              tallia1 last edited by

              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

              1 Reply Last reply Reply Quote 0
              • sierdzio
                sierdzio Moderators last edited by

                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.

                (Z(:^

                1 Reply Last reply Reply Quote 0
                • T
                  tallia1 last edited by

                  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.

                  1 Reply Last reply Reply Quote 0
                  • sierdzio
                    sierdzio Moderators last edited by

                    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":http://lists.qt.nokia.com/public/qt5-feedback/2011-October/001577.html). I think there was another thread on this, but have no time or will to search :)

                    (Z(:^

                    1 Reply Last reply Reply Quote 0
                    • T
                      tallia1 last edited by

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

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post