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. windeployqt.exe doesn't create a working package
QtWS25 Last Chance

windeployqt.exe doesn't create a working package

Scheduled Pinned Locked Moved Installation and Deployment
qt 5.6.0windowsdeploying
9 Posts 4 Posters 5.4k 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.
  • kalmantK Offline
    kalmantK Offline
    kalmant
    wrote on last edited by kalmant
    #1

    Hi, I have the following problem:

    I am working on an application and for testing purposes I need to deploy it onto Windows (I'm developing it in QT Creator on Windows). The application works correctly when ran from Creator. Shouldn't be too difficult, right?
    Well, I've tried building it in release mode and then running windeployqt.exe on the executable for my application.

    Right now when I run the .exe for my application it starts a process but no window shows up and the applciation crashes after a while. When it crashes it says that the Fault Module is Qt5Core.dll and the exception code is c0000005 (Access Violation).

    There have been some issues that I've been able to solve (it packaged the wrong libstdc++-6.dll along the other .dll's, but I've fixed that already) and ones I haven't.
    I've spent a good ammount of time going through dump files (created manually when the application crashes) and the following messages show up in them:

    'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\myapplication.exe'. Module was built without symbols.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\KERNELBASE.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\Qt5Core.dll'. Module was built without symbols.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\libgcc_s_dw2-1.dll'. Module was built without symbols.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\libwinpthread-1.dll'. Module was built without symbols.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\mpr.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\ole32.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\lpk.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\usp10.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\shell32.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\shlwapi.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\ws2_32.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\nsi.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\libstdc++-6.dll'. Module was built without symbols.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\Qt5Gui.dll'. Module was built without symbols.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\Qt5Multimedia.dll'. Module was built without symbols.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\Qt5Network.dll'. Module was built without symbols.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\crypt32.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\msasn1.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\dnsapi.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\IPHLPAPI.DLL'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\winnsi.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\Qt5Qml.dll'. Module was built without symbols.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\Qt5Quick.dll'. Module was built without symbols.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\Qt5Widgets.dll'. Module was built without symbols.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\fftw3.dll'. Module was built without symbols.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\libusb-1.0.dll'. Module was built without symbols.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\msctf.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\profapi.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\platforms\qwindows.dll'. Module was built without symbols.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\oleaut32.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\winmm.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\CRYPTBASE.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\uxtheme.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\audio\qtaudio_windows.dll'. Module was built without symbols.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\clbcatq.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\devenum.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\setupapi.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\devobj.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\ntmarta.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\Wldap32.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\MMDevAPI.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\propsys.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\wdmaud.drv'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\ksuser.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\avrt.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\wintrust.dll'. Cannot find or open the PDB file.
    'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\msdmo.dll'. Cannot find or open the PDB file.
    

    In another (smaller and automatically created by windows 7) dump file the following messages can be read:

    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\myapplication.exe'. Module was built without symbols.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\ntdll.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\kernel32.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\KERNELBASE.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\Qt5Core.dll'. Module was built without symbols.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\advapi32.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\msvcrt.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\sechost.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\rpcrt4.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\libgcc_s_dw2-1.dll'. Module was built without symbols.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\libwinpthread-1.dll'. Module was built without symbols.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\mpr.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\ole32.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\gdi32.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\user32.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\lpk.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\usp10.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\shell32.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\shlwapi.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\ws2_32.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\nsi.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\libstdc++-6.dll'. Module was built without symbols.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\Qt5Gui.dll'. Module was built without symbols.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\Qt5Multimedia.dll'. Module was built without symbols.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\Qt5Network.dll'. Module was built without symbols.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\crypt32.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\msasn1.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\dnsapi.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\IPHLPAPI.DLL'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\winnsi.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\Qt5Qml.dll'. Module was built without symbols.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\Qt5Quick.dll'. Module was built without symbols.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\Qt5Widgets.dll'. Module was built without symbols.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\fftw3.dll'. Module was built without symbols.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\libusb-1.0.dll'. Module was built without symbols.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\imm32.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\msctf.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\profapi.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\platforms\qwindows.dll'. Module was built without symbols.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\oleaut32.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\winmm.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\CRYPTBASE.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\uxtheme.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\audio\qtaudio_windows.dll'. Module was built without symbols.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\clbcatq.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\devenum.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\setupapi.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\cfgmgr32.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\devobj.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\ntmarta.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\Wldap32.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\MMDevAPI.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\propsys.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\wdmaud.drv'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\ksuser.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\avrt.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\wintrust.dll'. No matching binary found.
    'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\msdmo.dll'. No matching binary found.
    Unhandled exception at 0x68A0DF45 (Qt5Core.dll) in WERA104.tmp.mdmp: 0xC0000005: Access violation reading location 0x00000028.
    

    In theory I could find all the DLL's that can not be found in the minidump and put them next to my executable, however I think there is an underlying issue that perhaps someone could help me fix.

    Thanks in advance!

    EDIT: I'm using MinGW 49_32

    1 Reply Last reply
    0
    • sneubertS Offline
      sneubertS Offline
      sneubert
      wrote on last edited by
      #2

      Hi kalmant,

      you said: it packaged the wrong libstdc++-6.dll
      Maybe a silly question, but are you sure you call the rigth windeployqt.exe. You have to call the one in the bin dir of the kit you are using to build your application.
      Second make sure you don´t have any path to a MinGW installation in your environment variables.

      kalmantK 1 Reply Last reply
      0
      • sneubertS sneubert

        Hi kalmant,

        you said: it packaged the wrong libstdc++-6.dll
        Maybe a silly question, but are you sure you call the rigth windeployqt.exe. You have to call the one in the bin dir of the kit you are using to build your application.
        Second make sure you don´t have any path to a MinGW installation in your environment variables.

        kalmantK Offline
        kalmantK Offline
        kalmant
        wrote on last edited by
        #3

        @sneubert I am using the right windeployqt.exe (the one in the kit's folder).
        The wrong libstdc++-6.dll had been because I had had another MinGW installation in my path but removing it has not solved the problem.

        JKSHJ 1 Reply Last reply
        0
        • sneubertS Offline
          sneubertS Offline
          sneubert
          wrote on last edited by
          #4

          Did you try running your application in release mode within qt creator?
          Maybe it´s a problem with the memory layout in release build.

          kalmantK 1 Reply Last reply
          0
          • sneubertS sneubert

            Did you try running your application in release mode within qt creator?
            Maybe it´s a problem with the memory layout in release build.

            kalmantK Offline
            kalmantK Offline
            kalmant
            wrote on last edited by
            #5

            @sneubert Yeah, it works fine when ran in realease mode in Creator.

            1 Reply Last reply
            0
            • kalmantK kalmant

              @sneubert I am using the right windeployqt.exe (the one in the kit's folder).
              The wrong libstdc++-6.dll had been because I had had another MinGW installation in my path but removing it has not solved the problem.

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

              @kalmant said:

              I had had another MinGW installation in my path

              That often causes problems.

              What happens if you:

              1. Remove all MinGW from your PATH
              2. Delete all your compiled code and re-compile from scratch
                3 Deploy and run?
                ?

              Yeah, it works fine when ran in realease mode in Creator.

              1. Run your program from Qt Creator
              2. Use ListDLLs to see the exact paths of all loaded DLLs
              3. Close your program.
              4. Run your program from the deployment folder (on the same computer)
              5. When the crash message appears, don't close the message. Use ListDLLs again.
              6. Compare the DLL paths.

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

              kalmantK 1 Reply Last reply
              1
              • JKSHJ JKSH

                @kalmant said:

                I had had another MinGW installation in my path

                That often causes problems.

                What happens if you:

                1. Remove all MinGW from your PATH
                2. Delete all your compiled code and re-compile from scratch
                  3 Deploy and run?
                  ?

                Yeah, it works fine when ran in realease mode in Creator.

                1. Run your program from Qt Creator
                2. Use ListDLLs to see the exact paths of all loaded DLLs
                3. Close your program.
                4. Run your program from the deployment folder (on the same computer)
                5. When the crash message appears, don't close the message. Use ListDLLs again.
                6. Compare the DLL paths.
                kalmantK Offline
                kalmantK Offline
                kalmant
                wrote on last edited by kalmant
                #7

                @JKSH ListDLLs was a great idea, thanks!!
                It seems that windeployqt.exe doesn't package the necessary QtQuick DLLs, but copying those folders solved the problem.

                Thanks!

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

                  Hi,

                  Did you use the --qmldir parameter of windeployqt when calling it on 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

                  kalmantK 1 Reply Last reply
                  1
                  • SGaistS SGaist

                    Hi,

                    Did you use the --qmldir parameter of windeployqt when calling it on your application ?

                    kalmantK Offline
                    kalmantK Offline
                    kalmant
                    wrote on last edited by kalmant
                    #9

                    @SGaist no, I did not. I just tried it with --qmldir specified and it worked flawlessly. Lesson learnt. However, I feel the deployment article could be a little more informative.
                    I appreciate the help!

                    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