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. .exe file is not opening
QtWS25 Last Chance

.exe file is not opening

Scheduled Pinned Locked Moved Solved Installation and Deployment
26 Posts 5 Posters 3.5k 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.
  • V Offline
    V Offline
    Vijaykarthikeyan
    wrote on 31 Jul 2023, 06:26 last edited by
    #1

    I have completed a Qt project and it is running successfully in Qt tool. But, in build folder, under release subfolder (built only on release not debug), the .exe file when on clicking, it is not starting. Then. I have run the command prompt of Qt and used windeployqt.exe . to import all the libraries. But, again it is not starting. All the libraries are there. It is trying to load but not starting. No error Message appeared

    J J 2 Replies Last reply 31 Jul 2023, 06:30
    0
    • J jsulm
      19 Sept 2023, 06:23

      @Vijaykarthikeyan said in .exe file is not opening:

      --qmldir

      This should point to your QML files in the project folder, not in build folder as far as I know. And you're also missing path to the exe file when calling windeployqt.exe.

      V Offline
      V Offline
      Vijaykarthikeyan
      wrote on 19 Sept 2023, 07:11 last edited by Vijaykarthikeyan
      #25

      @jsulm So, the correct template should be look like this:

      <qt-binary-folder>windeployqt.exe --qmldir <path-to-project-file> <path-to-Qt-build-folder>

      1 Reply Last reply
      0
      • V Vijaykarthikeyan
        31 Jul 2023, 06:26

        I have completed a Qt project and it is running successfully in Qt tool. But, in build folder, under release subfolder (built only on release not debug), the .exe file when on clicking, it is not starting. Then. I have run the command prompt of Qt and used windeployqt.exe . to import all the libraries. But, again it is not starting. All the libraries are there. It is trying to load but not starting. No error Message appeared

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 31 Jul 2023, 06:30 last edited by jsulm
        #2

        @Vijaykarthikeyan One reason could be a plug-in which fails to load. To debug this set QT_DEBUG_PLUGINS to one in terminal and then start the app from same terminal. Check the output.
        Also check whether really all dependencies were deployed. On Windows you can use https://www.dependencywalker.com/ for that.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        J V 2 Replies Last reply 31 Jul 2023, 06:46
        3
        • J jsulm
          31 Jul 2023, 06:30

          @Vijaykarthikeyan One reason could be a plug-in which fails to load. To debug this set QT_DEBUG_PLUGINS to one in terminal and then start the app from same terminal. Check the output.
          Also check whether really all dependencies were deployed. On Windows you can use https://www.dependencywalker.com/ for that.

          J Online
          J Online
          JonB
          wrote on 31 Jul 2023, 06:46 last edited by
          #3

          @jsulm said in .exe file is not opening:

          On Windows you can use https://www.dependencywalker.com/ for that.

          For the record. I believe this no longer works for Windows 10+. I believe the replacement is https://github.com/lucasg/Dependencies.

          1 Reply Last reply
          3
          • V Vijaykarthikeyan
            31 Jul 2023, 06:26

            I have completed a Qt project and it is running successfully in Qt tool. But, in build folder, under release subfolder (built only on release not debug), the .exe file when on clicking, it is not starting. Then. I have run the command prompt of Qt and used windeployqt.exe . to import all the libraries. But, again it is not starting. All the libraries are there. It is trying to load but not starting. No error Message appeared

            J Offline
            J Offline
            J.Hilk
            Moderators
            wrote on 31 Jul 2023, 07:40 last edited by
            #4

            @Vijaykarthikeyan said in .exe file is not opening:

            I have run the command prompt of Qt and used windeployqt.exe

            but have you used it correctly ? there are options/arguments that may be important.

            Or you may also have used the wrong deployment tool as each kit has its own tool etc.. We need some more informations here


            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.

            V 1 Reply Last reply 1 Aug 2023, 07:01
            1
            • J jsulm
              31 Jul 2023, 06:30

              @Vijaykarthikeyan One reason could be a plug-in which fails to load. To debug this set QT_DEBUG_PLUGINS to one in terminal and then start the app from same terminal. Check the output.
              Also check whether really all dependencies were deployed. On Windows you can use https://www.dependencywalker.com/ for that.

              V Offline
              V Offline
              Vijaykarthikeyan
              wrote on 1 Aug 2023, 05:50 last edited by
              #5

              @jsulm Now, I have build my project on Debug mode and check that in Qt- Creator. It works well.

              And when running on Command terminal alone, it also works.

              I came to know that, running in debug mode will run the .exe file correctly but eventually takes more RAM and memory as it initializes the variables to the value whereas release version stripped off those one during optimization.

              Now, which one is preferrable?

              1 Reply Last reply
              0
              • J J.Hilk
                31 Jul 2023, 07:40

                @Vijaykarthikeyan said in .exe file is not opening:

                I have run the command prompt of Qt and used windeployqt.exe

                but have you used it correctly ? there are options/arguments that may be important.

                Or you may also have used the wrong deployment tool as each kit has its own tool etc.. We need some more informations here

                V Offline
                V Offline
                Vijaykarthikeyan
                wrote on 1 Aug 2023, 07:01 last edited by Vijaykarthikeyan 8 Jan 2023, 07:02
                #6

                @J-Hilk I have simply used windeployqt.exe .

                I though this " . " means all

                Regarding the tool, I have used msvc 32 bit in creator..and also opened msvc 32 bit command terminal to use this command line windeployqt.exe .

                J 1 Reply Last reply 1 Aug 2023, 07:54
                0
                • V Vijaykarthikeyan
                  1 Aug 2023, 07:01

                  @J-Hilk I have simply used windeployqt.exe .

                  I though this " . " means all

                  Regarding the tool, I have used msvc 32 bit in creator..and also opened msvc 32 bit command terminal to use this command line windeployqt.exe .

                  J Offline
                  J Offline
                  J.Hilk
                  Moderators
                  wrote on 1 Aug 2023, 07:54 last edited by
                  #7

                  @Vijaykarthikeyan are you using QML in your project ?


                  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.

                  V 1 Reply Last reply 2 Aug 2023, 10:44
                  0
                  • J J.Hilk
                    1 Aug 2023, 07:54

                    @Vijaykarthikeyan are you using QML in your project ?

                    V Offline
                    V Offline
                    Vijaykarthikeyan
                    wrote on 2 Aug 2023, 10:44 last edited by
                    #8

                    @J-Hilk yes.. QML for front end design..

                    C++ for backend processing

                    J 1 Reply Last reply 2 Aug 2023, 10:54
                    0
                    • V Vijaykarthikeyan
                      2 Aug 2023, 10:44

                      @J-Hilk yes.. QML for front end design..

                      C++ for backend processing

                      J Offline
                      J Offline
                      J.Hilk
                      Moderators
                      wrote on 2 Aug 2023, 10:54 last edited by
                      #9

                      @Vijaykarthikeyan than you're most certainly missing the QML part during windeployqt call:

                      --qmldir <directory>

                      with <directory> being the full path to your main QML folder, as in where your main.qml is

                      otherwise how should the tool know what from QML you used in your application


                      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.

                      V 2 Replies Last reply 3 Aug 2023, 07:11
                      1
                      • J J.Hilk
                        2 Aug 2023, 10:54

                        @Vijaykarthikeyan than you're most certainly missing the QML part during windeployqt call:

                        --qmldir <directory>

                        with <directory> being the full path to your main QML folder, as in where your main.qml is

                        otherwise how should the tool know what from QML you used in your application

                        V Offline
                        V Offline
                        Vijaykarthikeyan
                        wrote on 3 Aug 2023, 07:11 last edited by
                        #10

                        @J-Hilk Are you mentioning about this directory,

                        "qrc:/resources/main.qml"

                        I don't want to mention any specific directory because I want to deploy in various target systems. That's why I preferred this one over local directory

                        J 1 Reply Last reply 3 Aug 2023, 07:16
                        0
                        • V Vijaykarthikeyan
                          3 Aug 2023, 07:11

                          @J-Hilk Are you mentioning about this directory,

                          "qrc:/resources/main.qml"

                          I don't want to mention any specific directory because I want to deploy in various target systems. That's why I preferred this one over local directory

                          J Offline
                          J Offline
                          J.Hilk
                          Moderators
                          wrote on 3 Aug 2023, 07:16 last edited by
                          #11

                          @Vijaykarthikeyan you misunderstand, the windeployqt tool needs to know where your own qml files are so it can parse them, and according to the imports used, copy the needed dlls/modules over.

                          if you don't specify your qml folder via --qmldir that part of the deployment will be missing.

                          the tool will NOT copy any of your QML files over


                          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.

                          V 1 Reply Last reply 4 Sept 2023, 07:02
                          1
                          • J J.Hilk
                            3 Aug 2023, 07:16

                            @Vijaykarthikeyan you misunderstand, the windeployqt tool needs to know where your own qml files are so it can parse them, and according to the imports used, copy the needed dlls/modules over.

                            if you don't specify your qml folder via --qmldir that part of the deployment will be missing.

                            the tool will NOT copy any of your QML files over

                            V Offline
                            V Offline
                            Vijaykarthikeyan
                            wrote on 4 Sept 2023, 07:02 last edited by
                            #12

                            @J-Hilk Somewhat understandable.. but still confused.. I understand that i have to include --qmldir <path/to/qml>

                            Can you show me some minimal example..please,sir

                            J 1 Reply Last reply 4 Sept 2023, 07:06
                            0
                            • V Vijaykarthikeyan
                              4 Sept 2023, 07:02

                              @J-Hilk Somewhat understandable.. but still confused.. I understand that i have to include --qmldir <path/to/qml>

                              Can you show me some minimal example..please,sir

                              J Offline
                              J Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on 4 Sept 2023, 07:06 last edited by
                              #13

                              @Vijaykarthikeyan Not sure what example you need?
                              You simply add one additional parameter to windeployqt as explained in the documentation (https://doc.qt.io/qt-6/windows-deployment.html):
                              "--qmldir <directory> Scan for QML-imports starting from directory."

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              V 2 Replies Last reply 4 Sept 2023, 08:11
                              3
                              • J jsulm
                                4 Sept 2023, 07:06

                                @Vijaykarthikeyan Not sure what example you need?
                                You simply add one additional parameter to windeployqt as explained in the documentation (https://doc.qt.io/qt-6/windows-deployment.html):
                                "--qmldir <directory> Scan for QML-imports starting from directory."

                                V Offline
                                V Offline
                                Vijaykarthikeyan
                                wrote on 4 Sept 2023, 08:11 last edited by
                                #14
                                This post is deleted!
                                1 Reply Last reply
                                0
                                • J jsulm
                                  4 Sept 2023, 07:06

                                  @Vijaykarthikeyan Not sure what example you need?
                                  You simply add one additional parameter to windeployqt as explained in the documentation (https://doc.qt.io/qt-6/windows-deployment.html):
                                  "--qmldir <directory> Scan for QML-imports starting from directory."

                                  V Offline
                                  V Offline
                                  Vijaykarthikeyan
                                  wrote on 4 Sept 2023, 08:17 last edited by
                                  #15

                                  @jsulm I'm succesfully executed that command line : windeployqt --qmldir <path to qml directory in qt version> <bin_file>.exe..

                                  it is successfully scanned without any error:

                                  Updating tr.pak.
                                  Updating uk.pak.
                                  Updating vi.pak.
                                  Updating zh-CN.pak.
                                  Updating zh-TW.pak.

                                  C:\Users\hp\build-incline2-Desktop_Qt_5_15_2_MSVC2019_64bit-Release\release>

                                  but,then i try to run the.exe file,it is again not running

                                  J 1 Reply Last reply 4 Sept 2023, 09:15
                                  0
                                  • V Vijaykarthikeyan
                                    4 Sept 2023, 08:17

                                    @jsulm I'm succesfully executed that command line : windeployqt --qmldir <path to qml directory in qt version> <bin_file>.exe..

                                    it is successfully scanned without any error:

                                    Updating tr.pak.
                                    Updating uk.pak.
                                    Updating vi.pak.
                                    Updating zh-CN.pak.
                                    Updating zh-TW.pak.

                                    C:\Users\hp\build-incline2-Desktop_Qt_5_15_2_MSVC2019_64bit-Release\release>

                                    but,then i try to run the.exe file,it is again not running

                                    J Offline
                                    J Offline
                                    jsulm
                                    Lifetime Qt Champion
                                    wrote on 4 Sept 2023, 09:15 last edited by
                                    #16

                                    @Vijaykarthikeyan said in .exe file is not opening:

                                    it is again not running

                                    Same issue? Something else?

                                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    V 1 Reply Last reply 4 Sept 2023, 09:29
                                    0
                                    • J jsulm
                                      4 Sept 2023, 09:15

                                      @Vijaykarthikeyan said in .exe file is not opening:

                                      it is again not running

                                      Same issue? Something else?

                                      V Offline
                                      V Offline
                                      Vijaykarthikeyan
                                      wrote on 4 Sept 2023, 09:29 last edited by Vijaykarthikeyan 9 Apr 2023, 12:12
                                      #17

                                      @jsulm same issue.

                                      after running the command in corresponding directory like: windeployqt.exe --qmldir <path/to/qml library> <file_name.exe> ..it is scanned and updated allthe required libraries Screenshot 2023-09-04 145459.png

                                      when running that project's .exe file.,it is showing showMaximized,widgets.dll,webengine.dll,qt5core.dll,webenignecore.dll is not located in dllScreenshot 2023-09-04 145222.png

                                      all the requires libraries are updated but it shows error like this:Screenshot 2023-09-04 145715.png

                                      Is that any wrong with my command?

                                      johngodJ 1 Reply Last reply 9 Sept 2023, 21:35
                                      0
                                      • V Vijaykarthikeyan
                                        4 Sept 2023, 09:29

                                        @jsulm same issue.

                                        after running the command in corresponding directory like: windeployqt.exe --qmldir <path/to/qml library> <file_name.exe> ..it is scanned and updated allthe required libraries Screenshot 2023-09-04 145459.png

                                        when running that project's .exe file.,it is showing showMaximized,widgets.dll,webengine.dll,qt5core.dll,webenignecore.dll is not located in dllScreenshot 2023-09-04 145222.png

                                        all the requires libraries are updated but it shows error like this:Screenshot 2023-09-04 145715.png

                                        Is that any wrong with my command?

                                        johngodJ Offline
                                        johngodJ Offline
                                        johngod
                                        wrote on 9 Sept 2023, 21:35 last edited by
                                        #18

                                        @Vijaykarthikeyan said in .exe file is not opening:

                                        windeployqt.exe --qmldir <path/to/qml library> <file_name.exe> --compiler-runtime

                                        If you use Qt6 you need to use windeployqt6.exe instead of windeployqt.exe and you need to add --compiler-runtime to copy the missing compiler files

                                        To sum it all up, I usually create a folder were I copy only the executable file, cd in to that folder and run the windeployqt6 from there:

                                        cd D:\qtprojets\MyAppDeployFolder

                                        C:\QtOpensourse\6.5.0\mingw_64\bin\windeployqt6.exe --qmldir D:\qtprojets\MyApp D:\qtprojets\MyAppDeployFolder\MyApp.exe --compiler-runtime

                                        If you have several Qt versions, you should use the same windeployqt6.exe version of the compiled exe file

                                        V 1 Reply Last reply 14 Sept 2023, 10:30
                                        3
                                        • johngodJ johngod
                                          9 Sept 2023, 21:35

                                          @Vijaykarthikeyan said in .exe file is not opening:

                                          windeployqt.exe --qmldir <path/to/qml library> <file_name.exe> --compiler-runtime

                                          If you use Qt6 you need to use windeployqt6.exe instead of windeployqt.exe and you need to add --compiler-runtime to copy the missing compiler files

                                          To sum it all up, I usually create a folder were I copy only the executable file, cd in to that folder and run the windeployqt6 from there:

                                          cd D:\qtprojets\MyAppDeployFolder

                                          C:\QtOpensourse\6.5.0\mingw_64\bin\windeployqt6.exe --qmldir D:\qtprojets\MyApp D:\qtprojets\MyAppDeployFolder\MyApp.exe --compiler-runtime

                                          If you have several Qt versions, you should use the same windeployqt6.exe version of the compiled exe file

                                          V Offline
                                          V Offline
                                          Vijaykarthikeyan
                                          wrote on 14 Sept 2023, 10:30 last edited by
                                          #19

                                          @johngod I'm using 5.15.2

                                          johngodJ 1 Reply Last reply 15 Sept 2023, 05:28
                                          0
                                          • V Vijaykarthikeyan
                                            14 Sept 2023, 10:30

                                            @johngod I'm using 5.15.2

                                            johngodJ Offline
                                            johngodJ Offline
                                            johngod
                                            wrote on 15 Sept 2023, 05:28 last edited by
                                            #20

                                            @Vijaykarthikeyan Did it work ? If so, please mark the this as solved.

                                            V 2 Replies Last reply 19 Sept 2023, 06:20
                                            1

                                            • Login

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