Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
qmake_use.prf(6) 'take first' is not a recognized replace function
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.
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.
Is this your cross-compiled Qt?
Did you set-up a Kit with this Qt properly and used it with your project in QtCreator?
@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.
shows nothing but a directory
Did you run qmake from QtCreator?
@jsulm yes I did
@dmnc This is strange as you said you can build from QtCreator
@jsulm I googled a few days,but there seems no one get the same problem
@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?
pic 2:show file system:
pic 3:build project,I have already build before.
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 ...
dmnc last edited by dmnc
@kkoehne the version of mine is 3.3.0(opensource),I will try the latest version now.
@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。
@kkoehne I'm sorry, I wrote a wrong line in .pro file.Thank you very much,now ,all problem gone!