Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Can't correctly deploy application (missing dlls?)
Forum Updated to NodeBB v4.3 + New Features

Can't correctly deploy application (missing dlls?)

Scheduled Pinned Locked Moved Installation and Deployment
11 Posts 2 Posters 5.1k Views 1 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.
  • M Offline
    M Offline
    mpellegr
    wrote on last edited by
    #1

    Hello,
    I'm trying to deploy my application following this guide "http://qt-project.org/doc/qt-4.8/deployment-windows.html":http://qt-project.org/doc/qt-4.8/deployment-windows.html. I profiled the release executable using Dependency Walker and the only dependencies I seem to be missing are a few API-MS-WIN-CORE ones, DCOMP, GPSVC, and IESHIMS which would be expected from what I understand, but I am crashing when QTCORE4.DLL tries to dynamically load the WINTAB32.dll from the location 'C:\Windows\system32\wintab32.dll'. I checked and my computer does not have this file anywhere. I created a batch file that sets my path to the same that Qt is using when running my app, and then run dependency on the executable. What else could I be missing?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      welcome to devnet

      Which compiler are you using?
      You are listing only system dlls. For Mingw compiler for instance you need to include also some compiler specific dlls.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mpellegr
        wrote on last edited by
        #3

        I'm using mingw but I think the dlls are being found correctly, although one seems to be coming from the Qt directory and one from the mingw one. Here's a link to the crash as shown in Dependency Walker "http://postimg.org/image/gx3gm3e1x/":http://postimg.org/image/gx3gm3e1x/.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          Did you check out from where the Qt dlls were loaded?
          In case of different versions of Qt libs, they might get mixed. The combination of wintab32.dll and QtCore4.dll seem to create the issue. wintab32.dll can be found on internet and downloaded.
          However, make sure that the current version is not lost.

          One of the MinGW dlls is loaded from Qt bin folder while the other is found in the compiler part. That could be also a problem.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mpellegr
            wrote on last edited by
            #5

            The Qt dlls are loaded from C:\Qt\4.8.4\bin. If my path is the same as the one Qt is using, why am I having issues only when running outside of Qt? Is there something Qt is doing behind the scenes that I'm not aware of, like maybe should I also use all the environment variables Qt sets up?

            1 Reply Last reply
            0
            • K Offline
              K Offline
              koahnig
              wrote on last edited by
              #6

              [quote author="mpellegr" date="1370631532"]The Qt dlls are loaded from C:\Qt\4.8.4\bin. If my path is the same as the one Qt is using, why am I having issues only when running outside of Qt? Is there something Qt is doing behind the scenes that I'm not aware of, like maybe should I also use all the environment variables Qt sets up?[/quote]

              I am not aware of anything special. At least I am not using special environment settings. When checking the dlls for my apps, I am killing deliberately the path environment setting in a command line box. Copying all dlls into the folder with the application ensures that I have all together before shipping somewhere else.

              As noted above a bit strange is the different locations of the MinGW dlls libgcc*.dll and libstdc*.dll. I would choose them both from the mingw bin folder.

              Vote the answer(s) that helped you to solve your issue(s)

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mpellegr
                wrote on last edited by
                #7

                I've tried using both the libstdc and libgcc from my mingw directory, but the same crash happened. I'm actually not sure exactly which dll's are supposed to be used, that's why I'm looking at Qt's path to test which dll's I need to copy into the executable directory.

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  koahnig
                  wrote on last edited by
                  #8

                  I have just checked. wintab32.dll is not a normal windows dll. At least it is not on windows 7 64 bit available. It is apparently part of a tablet distro.
                  Which version of windows do you have? And on what is it installed?

                  Vote the answer(s) that helped you to solve your issue(s)

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mpellegr
                    wrote on last edited by
                    #9

                    I also have windows 7 64 bit and it's on a Dell Optiplex 790. Also, what did you mean by kill the path environment setting? Maybe I should try that.

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mpellegr
                      wrote on last edited by
                      #10

                      I finally figured it out! Apparently Qt runs the executable from its parent directory. Whereas I was double clicking the executable to run. This made my runtime path different than when run from Qt, and since I was using relative addressing I was looking in the wrong place. So I just created a batch file in the parent that will run the executable. Hope this helps other people!

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        koahnig
                        wrote on last edited by
                        #11

                        Thanks for notice. Good to know that you have solved your problem.
                        By killing the path I meant overwriting the "path" environment setting with "blank". This ensures that the application will not find any obscure Qt dll somewhere. Typically every application is extending the path environment setting. I have had occasions with an old Qt dll loaded from another rarely used application.

                        Vote the answer(s) that helped you to solve your issue(s)

                        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