Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. qmake_use.prf(6) 'take first' is not a recognized replace function
QtWS25 Last Chance

qmake_use.prf(6) 'take first' is not a recognized replace function

Scheduled Pinned Locked Moved Solved Mobile and Embedded
14 Posts 3 Posters 4.6k Views
  • 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.
  • D Offline
    D Offline
    dmnc
    wrote on 13 Aug 2018, 02:18 last edited by
    #1

    I make a cross-complier on ubuntu ,and successfully get a qmake.but when I open a qt creator and create a porject, the "General Messages" console print a project error: /home/damon/qt5/mkspecs/features/qmake_use.prf(6): 'take_first' is not a recongnized replace function.
    Project ERROR: Library " is not defined.
    Anyone have met this error and how to solve it ? thank you very much.

    J 1 Reply Last reply 13 Aug 2018, 05:34
    0
    • D Offline
      D Offline
      dmnc
      wrote on 13 Aug 2018, 03:19 last edited by
      #2

      Everything is all right when qt projects compiled and run with command line .So I thought this error is produce by the qtcreator,but I have try to use the two ways to install the qtcreator,one was run *.run package download from the download.qt.io/archive/qt/ ,the other was use command line :sudo apt-get install qtcreator. but both of them got the same error. I have no idea about what the qmake_use.prf is used for,and which place the 'take_first' function defined in? I searched the all the files under /qtbase directory ,but found nothing about the place that 'take_first' defined.

      1 Reply Last reply
      0
      • D dmnc
        13 Aug 2018, 02:18

        I make a cross-complier on ubuntu ,and successfully get a qmake.but when I open a qt creator and create a porject, the "General Messages" console print a project error: /home/damon/qt5/mkspecs/features/qmake_use.prf(6): 'take_first' is not a recongnized replace function.
        Project ERROR: Library " is not defined.
        Anyone have met this error and how to solve it ? thank you very much.

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 13 Aug 2018, 05:34 last edited by
        #3

        @dmnc said in qmake_use.prf(6) 'take first' is not a recognized replace function:

        /home/damon/qt5

        Is this your cross-compiled Qt?
        Did you set-up a Kit with this Qt properly and used it with your project in QtCreator?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        D 1 Reply Last reply 13 Aug 2018, 07:09
        0
        • J jsulm
          13 Aug 2018, 05:34

          @dmnc said in qmake_use.prf(6) 'take first' is not a recognized replace function:

          /home/damon/qt5

          Is this your cross-compiled Qt?
          Did you set-up a Kit with this Qt properly and used it with your project in QtCreator?

          D Offline
          D Offline
          dmnc
          wrote on 13 Aug 2018, 07:09 last edited by
          #4

          @jsulm I was referenced this tutorial http://wiki.qt.io/RaspberryPi2EGLFS
          and my cross compile command line: ./configure -release -opengl es2 -device linux-rasp-pi3-g++ for RPi3 -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v -no-use-gold-linker
          I created qt projects with my Kit setting for raspberry pi3B ,qmake and build,everyting is ok ,than I synchronized the executable files to the pi device ,they worked perfectly. but there exists another two problem ,one is the remote deploy function doesn't work,I added the follow codes to the .pro file already :INSTALLS+=target target.path=/home/pi/ ,but the "Files to deploy:"filed show empty,and the "Executable on device:" field show "Remote path not set".the other problem is the project tree in the Project panel shows nothing but a directory.

          J 1 Reply Last reply 13 Aug 2018, 07:17
          0
          • D dmnc
            13 Aug 2018, 07:09

            @jsulm I was referenced this tutorial http://wiki.qt.io/RaspberryPi2EGLFS
            and my cross compile command line: ./configure -release -opengl es2 -device linux-rasp-pi3-g++ for RPi3 -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v -no-use-gold-linker
            I created qt projects with my Kit setting for raspberry pi3B ,qmake and build,everyting is ok ,than I synchronized the executable files to the pi device ,they worked perfectly. but there exists another two problem ,one is the remote deploy function doesn't work,I added the follow codes to the .pro file already :INSTALLS+=target target.path=/home/pi/ ,but the "Files to deploy:"filed show empty,and the "Executable on device:" field show "Remote path not set".the other problem is the project tree in the Project panel shows nothing but a directory.

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 13 Aug 2018, 07:17 last edited by
            #5

            @dmnc said in qmake_use.prf(6) 'take first' is not a recognized replace function:

            shows nothing but a directory

            Did you run qmake from QtCreator?

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            D 1 Reply Last reply 13 Aug 2018, 07:19
            0
            • J jsulm
              13 Aug 2018, 07:17

              @dmnc said in qmake_use.prf(6) 'take first' is not a recognized replace function:

              shows nothing but a directory

              Did you run qmake from QtCreator?

              D Offline
              D Offline
              dmnc
              wrote on 13 Aug 2018, 07:19 last edited by
              #6

              @jsulm yes I did

              J 1 Reply Last reply 13 Aug 2018, 07:22
              0
              • D dmnc
                13 Aug 2018, 07:19

                @jsulm yes I did

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 13 Aug 2018, 07:22 last edited by
                #7

                @dmnc This is strange as you said you can build from QtCreator

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                D 1 Reply Last reply 13 Aug 2018, 07:30
                0
                • J jsulm
                  13 Aug 2018, 07:22

                  @dmnc This is strange as you said you can build from QtCreator

                  D Offline
                  D Offline
                  dmnc
                  wrote on 13 Aug 2018, 07:30 last edited by
                  #8

                  @jsulm I googled a few days,but there seems no one get the same problem0_1534145382777_211.png 0_1534145389182_222.png

                  J 1 Reply Last reply 13 Aug 2018, 07:34
                  0
                  • D dmnc
                    13 Aug 2018, 07:30

                    @jsulm I googled a few days,but there seems no one get the same problem0_1534145382777_211.png 0_1534145389182_222.png

                    J Offline
                    J Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on 13 Aug 2018, 07:34 last edited by
                    #9

                    @dmnc Can you show the content of the pro file?
                    What happens when you execute qmake (any errors/warnings)?
                    Also, Executable at host should contain file name, right?

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    D 1 Reply Last reply 13 Aug 2018, 07:41
                    0
                    • J jsulm
                      13 Aug 2018, 07:34

                      @dmnc Can you show the content of the pro file?
                      What happens when you execute qmake (any errors/warnings)?
                      Also, Executable at host should contain file name, right?

                      D Offline
                      D Offline
                      dmnc
                      wrote on 13 Aug 2018, 07:41 last edited by
                      #10

                      @jsulm
                      pic 1:qamke 0_1534145912884_223.png

                      pic 2:show file system:
                      0_1534145981703_224.png

                      pic 3:build project,I have already build before.
                      0_1534146074081_225.png

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        kkoehne
                        Moderators
                        wrote on 13 Aug 2018, 07:55 last edited by
                        #11

                        You said you tried different versions of Qt Creator, but have you also tried with the latest one (Qt Creator 4.7)?

                        take_first() is part of the qmake language since Qt 5.8.0 / Qt Creator 4.1.0. Qt Creator does contain it's own copy of the qmake parser, and therefore you need a recent version of Qt Creator to open .pro files with a recent version of Qt ...

                        Director R&D, The Qt Company

                        D 3 Replies Last reply 13 Aug 2018, 08:29
                        1
                        • K kkoehne
                          13 Aug 2018, 07:55

                          You said you tried different versions of Qt Creator, but have you also tried with the latest one (Qt Creator 4.7)?

                          take_first() is part of the qmake language since Qt 5.8.0 / Qt Creator 4.1.0. Qt Creator does contain it's own copy of the qmake parser, and therefore you need a recent version of Qt Creator to open .pro files with a recent version of Qt ...

                          D Offline
                          D Offline
                          dmnc
                          wrote on 13 Aug 2018, 08:29 last edited by dmnc
                          #12

                          @kkoehne the version of mine is 3.3.0(opensource),I will try the latest version now.

                          1 Reply Last reply
                          0
                          • K kkoehne
                            13 Aug 2018, 07:55

                            You said you tried different versions of Qt Creator, but have you also tried with the latest one (Qt Creator 4.7)?

                            take_first() is part of the qmake language since Qt 5.8.0 / Qt Creator 4.1.0. Qt Creator does contain it's own copy of the qmake parser, and therefore you need a recent version of Qt Creator to open .pro files with a recent version of Qt ...

                            D Offline
                            D Offline
                            dmnc
                            wrote on 13 Aug 2018, 09:24 last edited by
                            #13

                            @kkoehne thankx for your advise ,it woks!!!I installed qtCreator4.6.2,and the error has gone。but remote deploy function still not work ,the “Executable on device” field still shows the error:Executable path not set。

                            1 Reply Last reply
                            0
                            • K kkoehne
                              13 Aug 2018, 07:55

                              You said you tried different versions of Qt Creator, but have you also tried with the latest one (Qt Creator 4.7)?

                              take_first() is part of the qmake language since Qt 5.8.0 / Qt Creator 4.1.0. Qt Creator does contain it's own copy of the qmake parser, and therefore you need a recent version of Qt Creator to open .pro files with a recent version of Qt ...

                              D Offline
                              D Offline
                              dmnc
                              wrote on 13 Aug 2018, 09:49 last edited by
                              #14

                              @kkoehne I'm sorry, I wrote a wrong line in .pro file.Thank you very much,now ,all problem gone!

                              1 Reply Last reply
                              0

                              5/14

                              13 Aug 2018, 07:17

                              topic:navigator.unread, 9
                              • Login

                              • Login or register to search.
                              5 out of 14
                              • First post
                                5/14
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups
                              • Search
                              • Get Qt Extensions
                              • Unsolved