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. Executable won't run after windeployqt
QtWS25 Last Chance

Executable won't run after windeployqt

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 4 Posters 690 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.
  • ocgltdO Offline
    ocgltdO Offline
    ocgltd
    wrote on last edited by ocgltd
    #1

    I have a simple qt (mostly QML) app built in Win10-64 with Qt Creator. I tried using windeployqt as per directions I found online, and according to the output it found and copied all necessary files.

    BUT...when I try to run myapp.exe from the directory windeployqt filled with DLL's, nothing happens. I'm running from the command prompt, and there are no errors/messages, just return back to the prompt.

    I don't see any error in the system event viewer either.

    What is going wrong?

    ocgltdO 1 Reply Last reply
    0
    • ocgltdO ocgltd

      After reading lots of posts on StackOverflow, I'm starting to suspect that I need to tell windeployqt about my QML files (even though they are all in a QRC and compiled into the exe).

      I'm not sure why there is no error output to stdout/stderr but I'll report back on results

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #4

      @ocgltd said in Executable won't run after windeployqt:

      After reading lots of posts on StackOverflow, I'm starting to suspect that I need to tell windeployqt about my QML files (even though they are all in a QRC and compiled into the exe).

      I'm not sure why there is no error output to stdout/stderr but I'll report back on results

      that sounds about right, the windeployqt tool needs to know where your source qml files are, so it can parse them and fetch everything they import from the QT directory the --qmldir argument followed by the path to your qml files(folder) (main.qml etc)


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      2
      • ocgltdO ocgltd

        I have a simple qt (mostly QML) app built in Win10-64 with Qt Creator. I tried using windeployqt as per directions I found online, and according to the output it found and copied all necessary files.

        BUT...when I try to run myapp.exe from the directory windeployqt filled with DLL's, nothing happens. I'm running from the command prompt, and there are no errors/messages, just return back to the prompt.

        I don't see any error in the system event viewer either.

        What is going wrong?

        ocgltdO Offline
        ocgltdO Offline
        ocgltd
        wrote on last edited by ocgltd
        #2

        After reading lots of posts on StackOverflow, I'm starting to suspect that I need to tell windeployqt about my QML files (even though they are all in a QRC and compiled into the exe).

        I'm not sure why there is no error output to stdout/stderr but I'll report back on results

        JKSHJ J.HilkJ 2 Replies Last reply
        0
        • ocgltdO ocgltd

          After reading lots of posts on StackOverflow, I'm starting to suspect that I need to tell windeployqt about my QML files (even though they are all in a QRC and compiled into the exe).

          I'm not sure why there is no error output to stdout/stderr but I'll report back on results

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

          @ocgltd said in Executable won't run after windeployqt:

          After reading lots of posts on StackOverflow, I'm starting to suspect that I need to tell windeployqt about my QML files (even though they are all in a QRC and compiled into the exe).

          If your QML files are in a .qrc, then you don't neeed to tell windeployqt about them. [EDIT: See @J-Hilk's reply below]

          However, you might need to tell windeployqt to copy the built-in Qt QML files/plugins.

          I'm not sure why there is no error output to stdout/stderr but I'll report back on results

          Do you see anything in DebugView? https://docs.microsoft.com/en-us/sysinternals/downloads/debugview

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

          1 Reply Last reply
          0
          • ocgltdO ocgltd

            After reading lots of posts on StackOverflow, I'm starting to suspect that I need to tell windeployqt about my QML files (even though they are all in a QRC and compiled into the exe).

            I'm not sure why there is no error output to stdout/stderr but I'll report back on results

            J.HilkJ Offline
            J.HilkJ Offline
            J.Hilk
            Moderators
            wrote on last edited by
            #4

            @ocgltd said in Executable won't run after windeployqt:

            After reading lots of posts on StackOverflow, I'm starting to suspect that I need to tell windeployqt about my QML files (even though they are all in a QRC and compiled into the exe).

            I'm not sure why there is no error output to stdout/stderr but I'll report back on results

            that sounds about right, the windeployqt tool needs to know where your source qml files are, so it can parse them and fetch everything they import from the QT directory the --qmldir argument followed by the path to your qml files(folder) (main.qml etc)


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            1 Reply Last reply
            2
            • ocgltdO Offline
              ocgltdO Offline
              ocgltd
              wrote on last edited by
              #5

              OK solved. I needed to add the --qmldir option. So even though all of my QML files are in a QRC file, the windployqt program still needs to scan those file to find imports used by those files.

              As well, I had to add the compiler runtime option.

              Now it runs.

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

                Hi,

                windeployqt does not inspect the executable content, it's not a decompiler. That's why you have to use qmldir to point to your sources for it to do its work.

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

                ocgltdO 1 Reply Last reply
                2
                • SGaistS SGaist

                  Hi,

                  windeployqt does not inspect the executable content, it's not a decompiler. That's why you have to use qmldir to point to your sources for it to do its work.

                  ocgltdO Offline
                  ocgltdO Offline
                  ocgltd
                  wrote on last edited by
                  #7

                  @SGaist I get it now - but this would be a really nice explanation to add to the online documentation.

                  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