Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Dependency Walker shows some Qt dll's during profiling, should they be deployed?
Qt 6.11 is out! See what's new in the release blog

Dependency Walker shows some Qt dll's during profiling, should they be deployed?

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 3 Posters 3.2k Views 3 Watching
  • 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.
  • CAD_codingC Offline
    CAD_codingC Offline
    CAD_coding
    wrote on last edited by
    #1

    I ran my application with profiling in dependency walker and it showed the following libraries as required by Qt5Core.dll. (My application is dynamically linked to Qt).

    \plugins\imageformats\qgif.dll
    \plugins\imageformats\qico.dll
    \plugins\imageformats\qjpeg.dll
    \plugins\bearer\qgenericbearer.dll
    \plugins\bearer\qnativewifibearer.dll
    \plugins\accessible\qtaccessiblewidgets.dll
    wlanapi.dll.dll [yellow icon with ?, meaning dll not found]

    Now I can understand if qjpeg.dll is required, as I am opening JPEG images.
    qico.dll is probably required because I am using the Windows .ico file while building to add meta data like product version, product name, etc.

    But I do not understand why the remaining plugins are required?
    I have already deployed the Qt5Network.dll because I am using the QNetworkAccessManager::get (and post), for communicating with a server API to download/upload JSON files.

    What is interesting is that if I rename the Qt install folder so that the Qt SDK is not in the PATH, dependency walker is no longer showing these plugins even though the application is working just the same.

    So, can someone please tell me exactly what is going on, and which of these plugins I need to deploy?
    Thank you.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Both bearer plugins are there for the network module.

      The dlls coming from Windows should not be deployed with your application.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      CAD_codingC 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        Both bearer plugins are there for the network module.

        The dlls coming from Windows should not be deployed with your application.

        CAD_codingC Offline
        CAD_codingC Offline
        CAD_coding
        wrote on last edited by
        #3

        @SGaist
        Thank you for your reply!

        1. So I should distribute all the above dll's except wlanapi.dll.dll.
          I was actually not aware that I should distribute the bearer plugins.
          Is there a Qt tool which determines which Qt libraries I need to deploy?
          Just so that I don't repeat the same mistake again.

        2. My application is not able to load the jpeg images on non Qt SDK computers as expected. But how is it then it is able to communicate with the server without the bearer plugins?

        JKSHJ 1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You can use windeployqt for that, it should also add all plugins for the modules you are using. You might get more than what you use (e.g. the image formats plugin) since it can't guess what you are using exactly in your application.

          IIRC, they are used for network session handling.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • CAD_codingC CAD_coding

            @SGaist
            Thank you for your reply!

            1. So I should distribute all the above dll's except wlanapi.dll.dll.
              I was actually not aware that I should distribute the bearer plugins.
              Is there a Qt tool which determines which Qt libraries I need to deploy?
              Just so that I don't repeat the same mistake again.

            2. My application is not able to load the jpeg images on non Qt SDK computers as expected. But how is it then it is able to communicate with the server without the bearer plugins?

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by JKSH
            #5

            @CAD_coding said:

            1. So I should distribute all the above dll's except wlanapi.dll.dll.
              I was actually not aware that I should distribute the bearer plugins.

            Not quite. See below.

            Is there a Qt tool which determines which Qt libraries I need to deploy?

            Qt and your application do not "know" exactly which plugins you need. This is their "thought process":

            "Hmm... This application uses QImage, so let me search for image format plugins... OK I've found the GIF, ICO and JPEG plugins. I'm not sure what formats will be used, so I'll just load them all, to make sure I support all possibilities.

            There is no tool that can determine which plugins you need. Imagine this: You create an application lets the user to select an image file to display on screen. The deployment tool can't know what formats the user will select, so it cannot make decisions like "this application needs to support JPEG but not GIF". You, the developer, need to make that decision.

            If you don't want to support GIF images, don't deploy qgif.dll.

            Just so that I don't repeat the same mistake again.

            1. My application is not able to load the jpeg images on non Qt SDK computers as expected. But how is it then it is able to communicate with the server without the bearer plugins?

            The bearer plugins are for dynamically managing network interfaces. See http://doc.qt.io/qt-5/bearer-management.html

            You do not need the bearer plugin to call QNetworkAccessManager::get() and QNetworkAccessManager::post(). You only need to make sure that your computer is online.

            Finally, do you want to provide any accessibility features? (http://doc.qt.io/qt-5/accessible.html ) If not, you don't need to deploy qtaccessiblewidgets.dll

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            CAD_codingC 1 Reply Last reply
            2
            • JKSHJ JKSH

              @CAD_coding said:

              1. So I should distribute all the above dll's except wlanapi.dll.dll.
                I was actually not aware that I should distribute the bearer plugins.

              Not quite. See below.

              Is there a Qt tool which determines which Qt libraries I need to deploy?

              Qt and your application do not "know" exactly which plugins you need. This is their "thought process":

              "Hmm... This application uses QImage, so let me search for image format plugins... OK I've found the GIF, ICO and JPEG plugins. I'm not sure what formats will be used, so I'll just load them all, to make sure I support all possibilities.

              There is no tool that can determine which plugins you need. Imagine this: You create an application lets the user to select an image file to display on screen. The deployment tool can't know what formats the user will select, so it cannot make decisions like "this application needs to support JPEG but not GIF". You, the developer, need to make that decision.

              If you don't want to support GIF images, don't deploy qgif.dll.

              Just so that I don't repeat the same mistake again.

              1. My application is not able to load the jpeg images on non Qt SDK computers as expected. But how is it then it is able to communicate with the server without the bearer plugins?

              The bearer plugins are for dynamically managing network interfaces. See http://doc.qt.io/qt-5/bearer-management.html

              You do not need the bearer plugin to call QNetworkAccessManager::get() and QNetworkAccessManager::post(). You only need to make sure that your computer is online.

              Finally, do you want to provide any accessibility features? (http://doc.qt.io/qt-5/accessible.html ) If not, you don't need to deploy qtaccessiblewidgets.dll

              CAD_codingC Offline
              CAD_codingC Offline
              CAD_coding
              wrote on last edited by
              #6

              @JKSH
              Thank you very much for that eye opener!
              I understand now, what mistake I was doing with the image plugins.
              Certainly I do not need the bearer and accessibility plugins.
              I am opening JPEG files, so I will deploy that dll.
              Regarding ICO, I want to know whether I should deploy it or not?
              I am not supporting .ico files in my application, but it is however used during compile time for creating my application's icon logo (The image you see in Explorer when you select an exe).
              So is there a need to deploy the ICO plugin?

              JKSHJ 1 Reply Last reply
              0
              • CAD_codingC CAD_coding

                @JKSH
                Thank you very much for that eye opener!
                I understand now, what mistake I was doing with the image plugins.
                Certainly I do not need the bearer and accessibility plugins.
                I am opening JPEG files, so I will deploy that dll.
                Regarding ICO, I want to know whether I should deploy it or not?
                I am not supporting .ico files in my application, but it is however used during compile time for creating my application's icon logo (The image you see in Explorer when you select an exe).
                So is there a need to deploy the ICO plugin?

                JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote on last edited by
                #7

                You're welcome :)

                @CAD_coding said:

                Regarding ICO, I want to know whether I should deploy it or not?
                I am not supporting .ico files in my application, but it is however used during compile time for creating my application's icon logo (The image you see in Explorer when you select an exe).
                So is there a need to deploy the ICO plugin?

                No, because the icon is compiled into your .exe file, and Windows can read the icon data without Qt.

                The image format plugins are for loading images at run-time (while the program is running).

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                CAD_codingC 1 Reply Last reply
                1
                • JKSHJ JKSH

                  You're welcome :)

                  @CAD_coding said:

                  Regarding ICO, I want to know whether I should deploy it or not?
                  I am not supporting .ico files in my application, but it is however used during compile time for creating my application's icon logo (The image you see in Explorer when you select an exe).
                  So is there a need to deploy the ICO plugin?

                  No, because the icon is compiled into your .exe file, and Windows can read the icon data without Qt.

                  The image format plugins are for loading images at run-time (while the program is running).

                  CAD_codingC Offline
                  CAD_codingC Offline
                  CAD_coding
                  wrote on last edited by
                  #8

                  @JKSH
                  Thank you for your clarifications, it helped me a lot!

                  I am just asking this out of curiosity as this bug/behaviour has caused a great deal of embarrassment for me.
                  When running on non Qt SDK PC's my application is unable to load JPEG images.
                  However on my PC when I rename the Qt SDK so that it is unable to get the plugins from the SDK, it is still able to load the images...
                  How is this possible? These plugins were not loaded from anywhere as I checked with profiling on dependency walker.

                  [Embarrassing because I publicly posted on my Facebook that I had released a software that recommends movies, and when 200 odd people download it, half of them reported a crash to me {I had deleted a class variable pointer and was accessing it, strangely it was working on my PC, but crashed as expected on some PC's; should have crashed on mine too, but I don't know why it didn't}, some said images were not getting shown in the application{As JPEG plugin wasn't deployed it didn't show images on other PC's, but why was it showing on mine I don't know}. Google added salt to the wound by showing my setup exe for the next release (created with NSIS) stored on Drive as a virus... Hope you can understand my predicament]

                  1 Reply Last reply
                  0

                  • Login

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