Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. 0xC000007B error after releasing the application
Qt 6.12 LTS is out! See what's new in the release blog

0xC000007B error after releasing the application

Scheduled Pinned Locked Moved Solved General and Desktop
13 Posts 4 Posters 2.6k Views 1 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.
  • C ChrisW67

    @Blackzero said in 0xC000007B error after releasing the application:

    I don't know what the problem is

    The problem, "The Application Was Unable to Start (0xc000007b)"

    whether from Windows or from my application,

    Your application is missing one or more components that it needs to have in order to start. You are not deploying something essential (i.e. assuming it is already present and getting lucky sometimes). It may be a Microsoft C++ runtime, or it could be any of 100s of other things.
    You could use something like Dependencies.exe on a failing machine to see what is missing.

    does the application have to be made static or is it the same if it is made static?

    No. In order to build a static executable you need to fully understand the dependencies. This is the same problem you have now... and a lot more work.

    B Offline
    B Offline
    Blackzero
    wrote on last edited by
    #4

    @ChrisW67 said in 0xC000007B error after releasing the application:

    You could use something like Dependencies.exe on a failing machine to see what is missing.

    I have looked at it with Dependency Walker there are dozens of DLLs that operate on x86, why does that happen, is it part of my code, or is it not an error from my code?

    void runAsAdmin(const QString &exePath) {
        LPCWSTR applicationPath = (LPCWSTR)exePath.utf16();
        HINSTANCE hInstance = ShellExecute(nullptr, L"runas", applicationPath, nullptr, nullptr, SW_SHOWNORMAL);
        if (reinterpret_cast<intptr_t>(hInstance) <= 32) {
            DWORD errorCode = GetLastError();
            QMessageBox::critical(nullptr, "Honda Flash Tool", "Failed to run AutoUpdate in Administrator privilege mode. Error code: " + QString::number(errorCode), QMessageBox::Ok);
        } else {
            qApp->quit();
        }
    }
    

    if so it's an error from the code that requires x86 DLLs only this code I suspect, I have made sure the library I use is in x64 release mode, for example the library I use is crypto++, I have rebuilt it into x64 release.

    C 1 Reply Last reply
    0
    • C ChrisW67

      @Blackzero said in 0xC000007B error after releasing the application:

      I don't know what the problem is

      The problem, "The Application Was Unable to Start (0xc000007b)"

      whether from Windows or from my application,

      Your application is missing one or more components that it needs to have in order to start. You are not deploying something essential (i.e. assuming it is already present and getting lucky sometimes). It may be a Microsoft C++ runtime, or it could be any of 100s of other things.
      You could use something like Dependencies.exe on a failing machine to see what is missing.

      does the application have to be made static or is it the same if it is made static?

      No. In order to build a static executable you need to fully understand the dependencies. This is the same problem you have now... and a lot more work.

      B Offline
      B Offline
      Blackzero
      wrote on last edited by
      #5

      @ChrisW67
      This is the result of analysis with Dependency
      Screenshot 2024-08-23 163523.jpg

      1 Reply Last reply
      0
      • Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by Christian Ehrlicher
        #6

        When there are warning messages you should also read them...

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        1 Reply Last reply
        0
        • B Blackzero

          @ChrisW67 said in 0xC000007B error after releasing the application:

          You could use something like Dependencies.exe on a failing machine to see what is missing.

          I have looked at it with Dependency Walker there are dozens of DLLs that operate on x86, why does that happen, is it part of my code, or is it not an error from my code?

          void runAsAdmin(const QString &exePath) {
              LPCWSTR applicationPath = (LPCWSTR)exePath.utf16();
              HINSTANCE hInstance = ShellExecute(nullptr, L"runas", applicationPath, nullptr, nullptr, SW_SHOWNORMAL);
              if (reinterpret_cast<intptr_t>(hInstance) <= 32) {
                  DWORD errorCode = GetLastError();
                  QMessageBox::critical(nullptr, "Honda Flash Tool", "Failed to run AutoUpdate in Administrator privilege mode. Error code: " + QString::number(errorCode), QMessageBox::Ok);
              } else {
                  qApp->quit();
              }
          }
          

          if so it's an error from the code that requires x86 DLLs only this code I suspect, I have made sure the library I use is in x64 release mode, for example the library I use is crypto++, I have rebuilt it into x64 release.

          C Offline
          C Offline
          ChrisW67
          wrote on last edited by
          #7

          Dependency Walker has not been updated to handle some features in Windows 10+. Dependency.exe has.

          These tools will always report some warnings (esp. the first Error in the screen shot). What you are looking for is the components that you know are essential to your application. That's anything you have included in your installer (except the MS runtime), possibly the things you missed, and possibly things you have bundled the wrong version of. If any Qt plugin is needed to start your application then you can also run those plugin DLLs through a dependency check.

          There's no point asking us what the specific problem is; we cannot see your machines or project.

          1 Reply Last reply
          0
          • hskoglundH Offline
            hskoglundH Offline
            hskoglund
            wrote on last edited by
            #8

            Well at least Dependency Walker shows CPU architecture for the dlls, and we can see that the Qt5 dlls are built for 64-bits, however the Microsoft dlls are 32-bit (i.e. pulled in from C:\Windows\Syswow64 instead of C:\Windows\system32).
            So somewhere higher up in the app/dll foodchain there are one or more 32-bit flavored dlls or exes that causes the 0xC000007B error.

            B 1 Reply Last reply
            0
            • hskoglundH hskoglund

              Well at least Dependency Walker shows CPU architecture for the dlls, and we can see that the Qt5 dlls are built for 64-bits, however the Microsoft dlls are 32-bit (i.e. pulled in from C:\Windows\Syswow64 instead of C:\Windows\system32).
              So somewhere higher up in the app/dll foodchain there are one or more 32-bit flavored dlls or exes that causes the 0xC000007B error.

              B Offline
              B Offline
              Blackzero
              wrote on last edited by
              #9

              @hskoglund So is there any way to solve the DLL? Do I have to do the settings first, if so what should I set?

              Thank you .

              1 Reply Last reply
              0
              • hskoglundH Offline
                hskoglundH Offline
                hskoglund
                wrote on last edited by hskoglund
                #10

                Microsoft has stopped selling them, but maybe some of the laptops are old and use 32-bit versions of Windows 7 or Windows 10? If so your app might be innocent and the 0xc000007b occurs because those laptops do not support 64-bit apps.
                Edit: but your Qt5 64-bit dlls are loaded ok, so forget my 32-bit theory above :-)

                Best is to get a look at all the dlls loaded, a better tool for this is ListDLLs
                Start your app and then launch a CMD window and type listdlls <yourappname>.
                (You can catch the output to a file by appending a > filename at the end of the command line.)

                B 2 Replies Last reply
                3
                • hskoglundH hskoglund

                  Microsoft has stopped selling them, but maybe some of the laptops are old and use 32-bit versions of Windows 7 or Windows 10? If so your app might be innocent and the 0xc000007b occurs because those laptops do not support 64-bit apps.
                  Edit: but your Qt5 64-bit dlls are loaded ok, so forget my 32-bit theory above :-)

                  Best is to get a look at all the dlls loaded, a better tool for this is ListDLLs
                  Start your app and then launch a CMD window and type listdlls <yourappname>.
                  (You can catch the output to a file by appending a > filename at the end of the command line.)

                  B Offline
                  B Offline
                  Blackzero
                  wrote on last edited by
                  #11
                  This post is deleted!
                  1 Reply Last reply
                  0
                  • hskoglundH hskoglund

                    Microsoft has stopped selling them, but maybe some of the laptops are old and use 32-bit versions of Windows 7 or Windows 10? If so your app might be innocent and the 0xc000007b occurs because those laptops do not support 64-bit apps.
                    Edit: but your Qt5 64-bit dlls are loaded ok, so forget my 32-bit theory above :-)

                    Best is to get a look at all the dlls loaded, a better tool for this is ListDLLs
                    Start your app and then launch a CMD window and type listdlls <yourappname>.
                    (You can catch the output to a file by appending a > filename at the end of the command line.)

                    B Offline
                    B Offline
                    Blackzero
                    wrote on last edited by
                    #12
                    This post is deleted!
                    1 Reply Last reply
                    0
                    • B Blackzero has marked this topic as solved on
                    • B Blackzero deleted this topic on
                    • Christian EhrlicherC Offline
                      Christian EhrlicherC Offline
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on last edited by Christian Ehrlicher
                      #13

                      Why did you delete solved topics?

                      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                      Visit the Qt Academy at https://academy.qt.io/catalog

                      1 Reply Last reply
                      0
                      • Christian EhrlicherC Christian Ehrlicher restored this topic on

                      • Login

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