Reputation: 11
I've installed Qt 5.12 , When i want to compile my project show this errors:
Errors :
QOpenGLShaderProgram::uniformLocation(qt_Matrix): shader program is not linked
ensureInitialized(141): D3D compiler module not found.
QOpenGLShader::link: D3D compiler module not found.
shader compilation failed:
"D3D compiler module not found.\n"
Upvotes: 1
Views: 1813
Reputation: 36
According to bugreports.qt this issue is now fixed from version QT 5.12.1.
https://bugreports.qt.io/browse/QTBUG-71510
Upvotes: 1
Reputation: 1
I have the same issue on my older Del laptop. Placing d3dcompiler_43.dll in the exe folder does solve the issue. I found using one of the following commands also works, which I assume avoids ANGLE all together.
//To use pure OpenGL : QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
//Or use software emulated OpenGL : QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
I just include the first pure OpenGL setting in the "int main(int argc, char *argv[])" bracket in main.cpp
Upvotes: 0
Reputation: 2886
Welcome to SO!
First of all, let's clarify what the error means.
Qt uses ANGLE on Windows, which is a layer that allows to run OpenGL software on systems where OpenGL is not available, by traslanting the OpenGL calls into DirectX calls. Qt decides whether to go with pure OpenGL or ANGLE depending on the configuration of the machine (video card model, video drivers version, etc). More details on that are available at https://wiki.qt.io/Qt_5_on_Windows_ANGLE_and_OpenGL.
Even if you are not writing any OpenGL code yourself, the qml runtime surely has a lot of OpenGL calls that again, may go through ANGLE.
That is why the confusing error message (looking for the D3D shader compiler while dealing with OpenGL code!).
Now, the Qt project bugtracker reports the same issue you have https://bugreports.qt.io/browse/QTBUG-71510, although at the time of writing no solution has been provided. I would suggest to have a look at the bugtracker now and then to monitor the progress on this issue.
A couple of workarounds you may try:
Upvotes: 2