Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. I use windeployqt to package my program but some computers cannot run well.
QtWS25 Last Chance

I use windeployqt to package my program but some computers cannot run well.

Scheduled Pinned Locked Moved Unsolved Qt 6
5 Posts 2 Posters 426 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Touch
    wrote on last edited by
    #1

    I use QOpenGLWidget and GLSL 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:
    a225f755-4c4f-4232-9c54-f4e004037ca5-image.png

    1 Reply Last reply
    0
    • cristian-adamC Offline
      cristian-adamC Offline
      cristian-adam
      wrote on last edited by
      #2

      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 the QT_OPENGL environment variable to software before starting your application.

      Alternatively you can install OpenCL™ and OpenGL® Compatibility Pack from Microsoft Store.

      T 1 Reply Last reply
      2
      • T Offline
        T Offline
        Touch
        wrote on last edited by Touch
        #3

        Oh! Actually operating system does not show a message box, but the functions which use shader could not draw anything.
        So it is because the OpenGL driver. It do make sense.
        I am going to try your suggestion. Thank you!

        1 Reply Last reply
        0
        • cristian-adamC cristian-adam

          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 the QT_OPENGL environment variable to software before starting your application.

          Alternatively you can install OpenCL™ and OpenGL® Compatibility Pack from Microsoft Store.

          T Offline
          T Offline
          Touch
          wrote on last edited by
          #4

          @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..

          1 Reply Last reply
          0
          • cristian-adamC Offline
            cristian-adamC Offline
            cristian-adam
            wrote on last edited by
            #5

            I guess it depends of what you are using from OpenGL and GLSL.

            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

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved