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. Problem deploying a simple qml windows App
QtWS25 Last Chance

Problem deploying a simple qml windows App

Scheduled Pinned Locked Moved Installation and Deployment
9 Posts 3 Posters 2.3k 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.
  • C Offline
    C Offline
    Cyrille de Brebisson
    wrote on last edited by
    #1

    Hello,

    I have a relatively simple windows app compiled with MSVC2017_64bit SDK.

    The application runs OK in release mode from QT creator and VS2017.

    I tried running windeployqt.exe. It copies over 60MB of data in the executable folder, but the executable does NOT run. When I try to start it, nothing happends. No errors, but no messages or nothing.

    I tried copying the various needed dll in the folder, but I am getting stuck on a missing MSVCP140_APP.dll dll (ie: I start the exe. it complains that dll ??? is missing, so I copy the dll in the folder and try again).

    Any idea what is happening/what I am doing wrong/what I need to do?

    Thanks

    J.HilkJ 1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Follow the deployment guide. This is cumbersome, but you only need to do it once, thankfully :-)

      I am getting stuck on a missing MSVCP140_APP.dll

      Why stuck? You can't find it or? It's installed together with your compiler, search your c:/ drive for "msvcp140" and you'll get a bunch of results.

      (Z(:^

      1 Reply Last reply
      0
      • C Cyrille de Brebisson

        Hello,

        I have a relatively simple windows app compiled with MSVC2017_64bit SDK.

        The application runs OK in release mode from QT creator and VS2017.

        I tried running windeployqt.exe. It copies over 60MB of data in the executable folder, but the executable does NOT run. When I try to start it, nothing happends. No errors, but no messages or nothing.

        I tried copying the various needed dll in the folder, but I am getting stuck on a missing MSVCP140_APP.dll dll (ie: I start the exe. it complains that dll ??? is missing, so I copy the dll in the folder and try again).

        Any idea what is happening/what I am doing wrong/what I need to do?

        Thanks

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

        hi @Cyrille-de-Brebisson

        a typical error for applications that have QML parts is missing QML path.
        Did you spefify the folder where your QML files are during the execution of windeployqt.exe ? --qmldir


        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
        1
        • C Offline
          C Offline
          Cyrille de Brebisson
          wrote on last edited by
          #4

          Hello,

          Sorry, I miss-copied... I could not find vcruntime140_app.dll...
          I did finally manage to track the dll down and I now have the following in my directory:
          CBScope.exe MSVCP140_APP.DLL Qt5Core.dll Qt5Gui.dll Qt5Multimedia.dll Qt5Network.dll Qt5PrintSupport.dll Qt5Qml.dll Qt5Quick.dll Qt5Widgets.dll VCRUNTIME140_APP.DLL
          But the app is still not working, I just get a "crash" now: "application unable to start correctly"...

          the app is a QML application, but the qml files are resources of the application (compiled in). so I do not think that I need to specify a qml dir.. unless I am misunderstanding...

          Cyrille

          sierdzioS J.HilkJ 2 Replies Last reply
          0
          • C Cyrille de Brebisson

            Hello,

            Sorry, I miss-copied... I could not find vcruntime140_app.dll...
            I did finally manage to track the dll down and I now have the following in my directory:
            CBScope.exe MSVCP140_APP.DLL Qt5Core.dll Qt5Gui.dll Qt5Multimedia.dll Qt5Network.dll Qt5PrintSupport.dll Qt5Qml.dll Qt5Quick.dll Qt5Widgets.dll VCRUNTIME140_APP.DLL
            But the app is still not working, I just get a "crash" now: "application unable to start correctly"...

            the app is a QML application, but the qml files are resources of the application (compiled in). so I do not think that I need to specify a qml dir.. unless I am misunderstanding...

            Cyrille

            sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #5

            @Cyrille-de-Brebisson said in Problem deploying a simple qml windows App:

            the app is a QML application, but the qml files are resources of the application (compiled in). so I do not think that I need to specify a qml dir.. unless I am misunderstanding...

            You have to specify it even in that case, IIRC.

            (Z(:^

            1 Reply Last reply
            0
            • C Cyrille de Brebisson

              Hello,

              Sorry, I miss-copied... I could not find vcruntime140_app.dll...
              I did finally manage to track the dll down and I now have the following in my directory:
              CBScope.exe MSVCP140_APP.DLL Qt5Core.dll Qt5Gui.dll Qt5Multimedia.dll Qt5Network.dll Qt5PrintSupport.dll Qt5Qml.dll Qt5Quick.dll Qt5Widgets.dll VCRUNTIME140_APP.DLL
              But the app is still not working, I just get a "crash" now: "application unable to start correctly"...

              the app is a QML application, but the qml files are resources of the application (compiled in). so I do not think that I need to specify a qml dir.. unless I am misunderstanding...

              Cyrille

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

              @Cyrille-de-Brebisson said in Problem deploying a simple qml windows App:

              the app is a QML application, but the qml files are resources of the application (compiled in). so I do not think that I need to specify a qml dir.. unless I am misunderstanding...

              You do,
              the deployment tool needs to know where the actual qml files are, so it can check them for the Imports and copy needed dll's and plugins.


              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
              1
              • C Offline
                C Offline
                Cyrille de Brebisson
                wrote on last edited by
                #7

                Hello

                --qmldir was the problem! Thanks!
                However it is still over 60mb for a small 200KB app :-( seems like an overkill!

                cyrille

                sierdzioS J.HilkJ 2 Replies Last reply
                0
                • C Cyrille de Brebisson

                  Hello

                  --qmldir was the problem! Thanks!
                  However it is still over 60mb for a small 200KB app :-( seems like an overkill!

                  cyrille

                  sierdzioS Offline
                  sierdzioS Offline
                  sierdzio
                  Moderators
                  wrote on last edited by
                  #8

                  @Cyrille-de-Brebisson said in Problem deploying a simple qml windows App:

                  However it is still over 60mb for a small 200KB app :-( seems like an overkill!

                  Yep, that sucks, but is not avoidable. Well, you could cut it down to probably ~30MB with some tricks but not less. The reason why your app can be small is that Qt does the heavy lifting ;-) And that takes space.

                  (Z(:^

                  1 Reply Last reply
                  1
                  • C Cyrille de Brebisson

                    Hello

                    --qmldir was the problem! Thanks!
                    However it is still over 60mb for a small 200KB app :-( seems like an overkill!

                    cyrille

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

                    @Cyrille-de-Brebisson said in Problem deploying a simple qml windows App:

                    Hello

                    --qmldir was the problem! Thanks!

                    great that it works for you

                    However it is still over 60mb for a small 200KB app :-( seems like an overkill!

                    cyrille

                    That's the nature of things sadly. On the upside, it won't get significantly bigger, as long as you don't add new modules or new/different imports

                    There a ways to reduce the size, but its going to be time consuming.

                    Static build qt and / or Qt Lite

                    take a look at this - relatively - old blog entry
                    http://blog.qt.io/blog/2017/01/23/qt-5-8-released/


                    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
                    0

                    • Login

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