Makefile:412: recipe for target 'ui_mainwindow.h' failed
-
Hi,
I tried to compile and run my code on Raspberry Pi. I used "qmake /usr/local/qt5pi/LED/" command to compile my code, after that this command done, a Makefile created. now when i use "make" command, bellow error apear :/usr/lib/arm-linux-gnueabihf/qt5/bin/uic mainwindow.ui -o ui_mainwindow.h
/usr/lib/arm-linux-gnueabihf/qt5/bin/uic: relocation error: /usr/lib/arm-linux-gnueabihf/qt5/bin/uic: symbol qt_qhash_seed, version Qt_5 not defined in file libQt5Core.so.5 with link time reference
Makefile:412: recipe for target 'ui_mainwindow.h' failed
make: *** [ui_mainwindow.h] Error 127please help me!!
-
Hi,
What version of Qt are you using ?
How did you install it ? -
I used bellow link for cross compile Qt 5.11 on Raspberry Pi :
https://wiki.qt.io/RaspberryPi2EGLFS -
Since you cross-compiled Qt, how did you got qmake on your Raspberry Pi ?
-
@Momeneh said in Makefile:412: recipe for target 'ui_mainwindow.h' failed:
I used "sudo apt-get install qt5-default" command to get qmake.
This qmake does NOT belong to your cross-compiled Qt but to Qt provided by Raspbian!
-
@Momeneh said in Makefile:412: recipe for target 'ui_mainwindow.h' failed:
I used "sudo apt-get install qt5-default" command to get qmake.
This qmake does NOT belong to your cross-compiled Qt but to Qt provided by Raspbian!
-
@Momeneh You should compile Qt directly on your RaspberryPi, then you will have qmake there.
If you cross compile then tools like qmake are built for the host machine, because they are needed there. -
@jsulm
I should connect to RaspberryPi remotely with ssh and i use wiringPi library in my code, now i want to compile and run it on RaspberryPi and i don't know how to do it without qmake command.-
You cross compiled Qt for Raspberry Pi, right? Then you can build your app on your PC, copy the binary to your Raspberry Pi and run it there (you will need to copy cross compiled Qt libs, which are used by your app, to Raspberry Pi as well).
-
If you really want to build directly on Raspberry Pi, then install Qt provided by Raspbian as @SGaist said and use it, no need to build Qt by yourself.
You should decide first whether you want 1 or 2...
-