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. Run Qt Executable on Windows 11 - missing vcruntime140_app.dll
QtWS25 Last Chance

Run Qt Executable on Windows 11 - missing vcruntime140_app.dll

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 6 Posters 2.9k 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.
  • K Offline
    K Offline
    kevin_d
    wrote on last edited by
    #1

    Hello!

    I have developed a program, which is created on Windows 11 by Qt Creator.
    Current Settings is Qt 5.15.1 64 bit MSVC 2019, but i can vary this, eg. to MSVC 2015.

    Out of the devenv, debug and release build is running stable.
    As soon as i want to start the .exe out of the release folder, I get errors of missing VC Runtime dlls.

    - VCRUNTIME140_APP.dll
    - VCRUNTIME140_1_APP.dll
    - MSVCP140_APP.dll
    - MSVCP140_1_APP.dll
    

    I have installed most of the VC Runtimes along with VS 2015, 2017 and 2019.

    How can I link these dlls out of QtCreator or where can I get the official dlls to execute the standalone application?

    best regards, kevin

    J.HilkJ 1 Reply Last reply
    0
    • K kevin_d

      Hello!

      I have developed a program, which is created on Windows 11 by Qt Creator.
      Current Settings is Qt 5.15.1 64 bit MSVC 2019, but i can vary this, eg. to MSVC 2015.

      Out of the devenv, debug and release build is running stable.
      As soon as i want to start the .exe out of the release folder, I get errors of missing VC Runtime dlls.

      - VCRUNTIME140_APP.dll
      - VCRUNTIME140_1_APP.dll
      - MSVCP140_APP.dll
      - MSVCP140_1_APP.dll
      

      I have installed most of the VC Runtimes along with VS 2015, 2017 and 2019.

      How can I link these dlls out of QtCreator or where can I get the official dlls to execute the standalone application?

      best regards, kevin

      J.HilkJ Online
      J.HilkJ Online
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @kevin_d
      your using MSVC so your target computer needs to have a compatible Microsoft Visual C++ Redistributable installed.

      you get that directly from windows
      https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

      if that installed, missing dlls like

      • VCRUNTIME140_APP.dll
      • VCRUNTIME140_1_APP.dll
      • MSVCP140_APP.dll
      • MSVCP140_1_APP.dll

      won't be a problem any more


      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
      • K Offline
        K Offline
        kevin_d
        wrote on last edited by
        #3

        Hello!

        Thanks for reply.
        I did, both x86 and x64 for 2015 - 2022 should be installed.

        The error remains.

        1 Reply Last reply
        0
        • O Offline
          O Offline
          ollarch
          wrote on last edited by
          #4

          Hi,

          Try uninstalling 2015 - 2022 redist and install 2019 redist. I had the same problem with VS 2015 on Windows 10.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kevin_d
            wrote on last edited by
            #5

            Same situation.

            Cobra91151C 1 Reply Last reply
            0
            • K kevin_d

              Same situation.

              Cobra91151C Offline
              Cobra91151C Offline
              Cobra91151
              wrote on last edited by Cobra91151
              #6

              @kevin_d

              Hello!

              Have you tried to put these components inside the application directory? Also, I would recommend to use Dependencies (https://github.com/lucasg/Dependencies) or Dependency Walker (http://www.dependencywalker.com/) to check for the missing libraries in such case.

              1 Reply Last reply
              1
              • cristian-adamC Online
                cristian-adamC Online
                cristian-adam
                wrote on last edited by
                #7

                You can use the local deployment described at https://docs.microsoft.com/en-us/cpp/windows/deployment-in-visual-cpp?view=msvc-170

                This means you just have to copy the dlls alongside your executable.

                1 Reply Last reply
                1
                • K Offline
                  K Offline
                  kevin_d
                  wrote on last edited by
                  #8

                  HI!
                  The mentioned dlls were clearly dependencies of necessary Qt libraries.
                  I added the path to Qt5/bin to my runtime-environment and now the application starts without an error:

                  SET BASE_DIR=C:\Qt\5.15.1\msvc2019_64
                  SET PATH=%BASE_DIR%\bin;%PATH%
                  application.exe %*
                  

                  The problem is that I cannot require the user to install Qt5 for executing my program, so what do I need in advance to deploy my application without additional installation, eg: standalone?

                  Help is very appreciated.

                  jsulmJ 1 Reply Last reply
                  0
                  • K kevin_d

                    HI!
                    The mentioned dlls were clearly dependencies of necessary Qt libraries.
                    I added the path to Qt5/bin to my runtime-environment and now the application starts without an error:

                    SET BASE_DIR=C:\Qt\5.15.1\msvc2019_64
                    SET PATH=%BASE_DIR%\bin;%PATH%
                    application.exe %*
                    

                    The problem is that I cannot require the user to install Qt5 for executing my program, so what do I need in advance to deploy my application without additional installation, eg: standalone?

                    Help is very appreciated.

                    jsulmJ Online
                    jsulmJ Online
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @kevin_d You should take a look at https://doc.qt.io/qt-5/windows-deployment.html
                    You can use that windeployqt to create a folder containing your app and all needed Qt libs and plug-ins.

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

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kevin_d
                      wrote on last edited by
                      #10

                      @jsulm

                      Thanks! A simple call:

                      windeployqt.exe --release "C:\build_directory\release"
                      

                      did the trick.
                      I have a lot of files copied and the size of the deployment changed significantly, but now it works when starting the executable directly.

                      best regard

                      ~ solved

                      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