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. Qt application gives 0xc000007b error

Qt application gives 0xc000007b error

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 4 Posters 15.6k Views 2 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.
  • O Offline
    O Offline
    ouzan
    wrote on last edited by
    #1

    Hi everbody,

    I've install qt-opensource-windows-x86-msvc2015_64-5.8.0 and qt-vs-tools-msvc2015-2.1.1 on 64-bit Windows 10. Then, I've created an empty project and when run it via F5 (and also Ctrl + F5) key in Visual Studio 2015 in Release(x64) mode, everything works fine. However, running it via double click on the created .exe file gives 0xc000007b error. This error is caused by 32-bit 64-bit confusion but all the things are 64-bit. Any idea how to fix?

    jsulmJ 1 Reply Last reply
    0
    • O ouzan

      Hi everbody,

      I've install qt-opensource-windows-x86-msvc2015_64-5.8.0 and qt-vs-tools-msvc2015-2.1.1 on 64-bit Windows 10. Then, I've created an empty project and when run it via F5 (and also Ctrl + F5) key in Visual Studio 2015 in Release(x64) mode, everything works fine. However, running it via double click on the created .exe file gives 0xc000007b error. This error is caused by 32-bit 64-bit confusion but all the things are 64-bit. Any idea how to fix?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @ouzan To run your app outside of VS/QtCreator you need to deploy it, see http://doc.qt.io/qt-5/windows-deployment.html

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

      1 Reply Last reply
      1
      • O Offline
        O Offline
        ouzan
        wrote on last edited by
        #3

        Actually not. I've been able to run in such a way many times before (for example on 64-bit Windows 8.1). Anyway, following the instructions causes the same result. The .exe loads all the needed dll files but some of them have wrong version (32-bit, 64-bit).

        Thanks for your quick answer.

        mrjjM 1 Reply Last reply
        0
        • O ouzan

          Actually not. I've been able to run in such a way many times before (for example on 64-bit Windows 8.1). Anyway, following the instructions causes the same result. The .exe loads all the needed dll files but some of them have wrong version (32-bit, 64-bit).

          Thanks for your quick answer.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @ouzan

          Hi
          Running WITHOUT a deployment folder is not supported.

          Sometimes it works due to Qt being in path or some random
          other app that has the Qt dlls and your app loads from there.

          So make your self a deployment folder to do this the right way.

          O 1 Reply Last reply
          0
          • mrjjM mrjj

            @ouzan

            Hi
            Running WITHOUT a deployment folder is not supported.

            Sometimes it works due to Qt being in path or some random
            other app that has the Qt dlls and your app loads from there.

            So make your self a deployment folder to do this the right way.

            O Offline
            O Offline
            ouzan
            wrote on last edited by
            #5

            @mrjj

            Thank you, running windeployqt.exe put all the things needed next to the .exe. Then, I put them into another folder and set this folder as library path in the code using CoreApplication::setLibraryPaths. But it fails. Tried both absolute and relative path. What am I missing?

            mrjjM hskoglundH 2 Replies Last reply
            0
            • O ouzan

              @mrjj

              Thank you, running windeployqt.exe put all the things needed next to the .exe. Then, I put them into another folder and set this folder as library path in the code using CoreApplication::setLibraryPaths. But it fails. Tried both absolute and relative path. What am I missing?

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by mrjj
              #6

              @ouzan said in Qt application gives 0xc000007b error:

              CoreApplication::setLibraryPaths

              That is normally not needed unless its very special setup.

              Please have a look here
              http://www.tripleboot.org/?p=138
              (find your compiler)

              Also this tool can be helpful
              http://www.dependencywalker.com/
              Since it will show what dlls get loaded from where.

              O 1 Reply Last reply
              3
              • O ouzan

                @mrjj

                Thank you, running windeployqt.exe put all the things needed next to the .exe. Then, I put them into another folder and set this folder as library path in the code using CoreApplication::setLibraryPaths. But it fails. Tried both absolute and relative path. What am I missing?

                hskoglundH Offline
                hskoglundH Offline
                hskoglund
                wrote on last edited by
                #7

                @ouzan Once you've run windeployqt.exe on your files, then they are folder agnostic, i.e. as long as you copy them (including the subfolders like platforms) all together they can be run from any place on your computer.
                And as @mrjj says, using QCoreApplication::setLibraryPaths shouldn't be necessary.

                1 Reply Last reply
                3
                • mrjjM mrjj

                  @ouzan said in Qt application gives 0xc000007b error:

                  CoreApplication::setLibraryPaths

                  That is normally not needed unless its very special setup.

                  Please have a look here
                  http://www.tripleboot.org/?p=138
                  (find your compiler)

                  Also this tool can be helpful
                  http://www.dependencywalker.com/
                  Since it will show what dlls get loaded from where.

                  O Offline
                  O Offline
                  ouzan
                  wrote on last edited by
                  #8

                  @mrjj I've figured out the problem. An application (CMake) installed in my machine has Qt5Core.dll in bin folder which is in PATH variable. My application tries to get it and it is 32-bit!

                  Thank you all.

                  mrjjM 1 Reply Last reply
                  0
                  • O ouzan

                    @mrjj I've figured out the problem. An application (CMake) installed in my machine has Qt5Core.dll in bin folder which is in PATH variable. My application tries to get it and it is 32-bit!

                    Thank you all.

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @ouzan
                    Super.
                    Yep, that is why just running exe by clicking demands a deployment folder to avoid
                    these wonderful surprises :)

                    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