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
Forum Updated to NodeBB v4.3 + New Features

Executable won't run after windeployqt

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 4 Posters 823 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.
  • O Offline
    O Offline
    ocgltd
    wrote on 27 Jul 2021, 16:22 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?

    O 1 Reply Last reply 28 Jul 2021, 00:53
    0
    • O ocgltd
      28 Jul 2021, 00:53

      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 Offline
      J Offline
      J.Hilk
      Moderators
      wrote on 28 Jul 2021, 04:51 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
      • O ocgltd
        27 Jul 2021, 16:22

        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?

        O Offline
        O Offline
        ocgltd
        wrote on 28 Jul 2021, 00:53 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

        J J 2 Replies Last reply 28 Jul 2021, 01:33
        0
        • O ocgltd
          28 Jul 2021, 00:53

          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 Offline
          J Offline
          JKSH
          Moderators
          wrote on 28 Jul 2021, 01:33 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
          • O ocgltd
            28 Jul 2021, 00:53

            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 Offline
            J Offline
            J.Hilk
            Moderators
            wrote on 28 Jul 2021, 04:51 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
            • O Offline
              O Offline
              ocgltd
              wrote on 28 Jul 2021, 15:42 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
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 28 Jul 2021, 18:01 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

                O 1 Reply Last reply 29 Jul 2021, 20:22
                2
                • S SGaist
                  28 Jul 2021, 18:01

                  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.

                  O Offline
                  O Offline
                  ocgltd
                  wrote on 29 Jul 2021, 20:22 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

                  1/7

                  27 Jul 2021, 16:22

                  • Login

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