Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt on Raspberry relocation error
I cross-compiled Qt 5.11 for Raspian Stretch. When trying out my qt application I get the following error:
./myprog: relocation error: /usr/local/qt5pi/lib/libQt5Quick.so.5: symbol _ZNK14QWindowPrivate12shareContextEv, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference
what is the problem?
you should at least show the configure call of your cross compilation
./configure -release -opengl es2 -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=/home/username/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /home/username/raspberry/sysroot/ -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /home/username/raspberry/qt5pi -hostprefix /home/username/raspberry/qt5pi_host -v
I was compiling under Ubuntu 16.04.
Hm, the error went away after setting
I don't understand why this was necessary, as ldd already reported that it found the shared objects.
Now I get the following error:
QQmlApplicationEngine failed to load component
qrc:/main.qml:4 module "QtQuick.Controls" is not installed
Did you copy your cross-compiled version of Qt on your target ?
During make install my disk ran out of space and I did not notice the error and only copied a partial qt install
it is working fine now
Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)