Important: Please read the Qt Code of Conduct -

The application was unable to start correctly (0xc000007b)

  • Recently I began programming applications with Qt (5.12.3). When building (with mingw730_64) and starting applications in Qt Creator (4.9.0) for Windows 10, everything is fine, but when trying to start the .exe (after deploying it with windeployqt.exe from mingw73_64), I get the error message "The application was unable to start correctly (0xc000007b)". I should say that I have a earlier installation of mingw32 (not bundled with Qt), so I'm not sure, if this two installations conflict or if this is a problem at all. I tried to run Dependency Walker (v2.2 x64 and x86), but after loading the .exe, the walker refused to operate. Anyway any hint to solve my problem would be very much appreciated. Thanks in advance!

  • Lifetime Qt Champion

    @JakobJohannes I'd start inspecting the PATH variable. If there are directories with other MinGW or Qt versions in it, strange things can happen.

    On the other hand, I never saw Dependency Walker refusing it's work. You seem to hit a very heavy problem :)

    Have you already tried running the app on another PC?

  • @JakobJohannes you can put the exe in qt dir and try start it to quick test

  • Perhaps look at the windeployqt log/output and check to see if its grabbing dlls from places it should not. Like is it grabbing dlls from the wrong version of mingw or something silly like that. Also, make sure the windeployqt is being run from the proper version of qt, if multiples installed.

    I ran into that issue with lupdate/lrelease as it is installed in Ubuntu and available, but does not catch everything that the version that ships with 5.12.2 does.

  • Thanks to all three replies I could solve the problem: The PATH variable contained the directory of the older MinGW. I had to replace it with the directory of the compiler (mingw730_64) coming with the installation of Qt. Then, after running again windeployqt.exe (from mingw73_64), the correct dlls were installed in the app directory and now my apps are running fine!
    Of great help was looking at the PATH-Variable, trying the .exe in the qt directory and checking the log/output of the windeployqt.exe.
    Thanks again for the quick and useful help!

  • Lifetime Qt Champion

    @JakobJohannes said in The application was unable to start correctly (0xc000007b):

    I had to replace it with the directory of the compiler (mingw730_64) coming with the installation of Qt

    You don't have to add the compiler directory to your PATH (unless you want to call the compiler manually from command line). In QtCreator you specify the full path to compiler anyway.

  • @jsulm: When executing windeployqt.exe without the compiler directory in the PATH, the output of windeployqt gives the warning:

    Warning: Cannot find GCC installation directory. g++.exe must be in the path.

    Then calling the .exe gives multiple error messages telling that dlls are missing:
    In my case: libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll.
    Actually my compiler is in another directory (Qtdir\Tools\mingw730_64\bin) than the windeployqt.exe (Qtdir\5.12.3\mingw73_64\bin). That may be the reason, why I need the PATH variable set to the compiler directory.

  • Lifetime Qt Champion

    @JakobJohannes If you set the compiler path only in the shell for windeployqt, that is Ok. Setting it in global environment can have the side effects you already noticed.

    Btw, newer Creator versions allow using the selected run environment for shell or external tools.


Log in to reply