Solved Error QOpenGLShader: could not create shader
-
Hi,
I am new to qt and I just set-up cross-compilation on my raspberry pi using the below guide.
https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/
After this I tried to run a simple widget program and it gave me below error :
'''
QOpenGLShader: could not create shader
Could not link shader program:
""
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShaderProgram::uniformLocation(texture): shader program is not linked
QOpenGLShaderProgram::uniformLocation(mat): shader program is not linked
'''
And the raspberry pi screen goes blank instead of showing the simple label it had . Any guidance as to what this error is related to and how to solve it would be grately appreciated.
I am using Raspberry Pi 3 running raspbian stretch, and im compiling qt 5.12.3 using ubuntu 16.04 . -
Problem Solved . Found it in one of the comments of the same site:
https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/Typing it again .
It seems like the lib /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 is wrong.
The right lib is /opt/vc/lib/libbrcmGLESv2.so
So, make a backup of /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 then
rm /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2and :
ln -s /opt/vc/lib/libbrcmGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 I can now run my cross compiled app from Qt Creator on Rasp.
-
Problem Solved . Found it in one of the comments of the same site:
https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/Typing it again .
It seems like the lib /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 is wrong.
The right lib is /opt/vc/lib/libbrcmGLESv2.so
So, make a backup of /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 then
rm /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2and :
ln -s /opt/vc/lib/libbrcmGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 I can now run my cross compiled app from Qt Creator on Rasp.
-
@abdussalam Thank you ! Really !