I use windeployqt to package my program but some computers cannot run well.
-
I use
QOpenGLWidget
andGLSL
to draw things, but some computers cannot show anything.
I guess the reason is that I have not collect all the.dll
files.
I hope to get a way to find all the files.This is my
.pro
file.QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++17 # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ driveassistant.cpp \ driveassistantwindow.cpp \ imagewidget.cpp \ interactiveimagewidget.cpp \ main.cpp \ mypainter.cpp HEADERS += \ driveassistant.h \ driveassistantwindow.h \ imagewidget.h \ interactiveimagewidget.h \ mypainter.h FORMS += \ driveassistantwindow.ui # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target ## ===========opengl============== QT += opengl QT += core gui openglwidgets QT += widgets ## =============================== # ============gl=============== win32: LIBS += -lOpenGL32 win32: LIBS += -lGlU32 #==============================
After do the
windeployqt
the directory shows:
-
Maybe it has something to do with the OpenGL drivers missing on those "some" computers.
The missing DLLs dependencies errors are different, the operating system is showing a message box.
I see you have
opengl32sw.dll
, which you can use on those "some" computers by setting theQT_OPENGL
environment variable tosoftware
before starting your application.Alternatively you can install OpenCL™ and OpenGL® Compatibility Pack from Microsoft Store.
-
@cristian-adam
sorry. I try the two methods but does not work.
Then I install the NVIDIA support for OpenGL Driver Support, it still can not draw anything.
I don't know what i should do.. -
I guess it depends of what you are using from
OpenGL
andGLSL
.The
opengl32sw.dll
(mesa3d llvmpipe) that Qt is using is a bit dated, and might not provide the OpenGL version that you need.You can get a newer version from https://github.com/pal1000/mesa-dist-win