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. Program runs from Qt Creator in release mode, but not from the executable
Forum Updated to NodeBB v4.3 + New Features

Program runs from Qt Creator in release mode, but not from the executable

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 376 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.
  • L Offline
    L Offline
    Linhares
    wrote on 15 Aug 2022, 19:50 last edited by SGaist
    #1

    I have a program that compiles and runs correctly from Qt Creator in both debug and release mode. However, if I try to run the executable, I get this error:

    The application was unable to start correctly (0xc000007b)
    

    I've run windeployqt but it didn't solve the problem.
    My compiler is MSVC 2019 32-bit. I'm using Windows 10 and Qt 5.15
    From what I've read, it looks like my issue is due to a conflict between 32-bit and 64-bit architectures. If this is the case, how can I check which of my libraries might be causing the conflict?

    1 Reply Last reply
    0
    • C Online
      C Online
      Chris Kawa
      Lifetime Qt Champion
      wrote on 15 Aug 2022, 21:34 last edited by
      #2

      You can load your app in Dependencies and it will show you everything your app is depending on and trying to load. Maybe you have a dll dependency that gets pulled in because of polluted PATH or system directories.

      Btw. Just out of curiosity - why are you making 32bit app for Windows? Is significant portion of your users still on 32bit systems?

      1 Reply Last reply
      0
      • L Offline
        L Offline
        Linhares
        wrote on 17 Aug 2022, 15:24 last edited by
        #3

        Thanks, @Chris-Kawa .
        I've just run Dependencies and added the dlls that were missing. However, now I get a different error when I try to run the program:

        qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""
        This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
        

        Is there any way to make it work without reinstalling?

        I'm making 32bit app for Windows because I use a dll from a 3rd party company and it doesn't work with 64bit.

        1 Reply Last reply
        0
        • C Online
          C Online
          Chris Kawa
          Lifetime Qt Champion
          wrote on 17 Aug 2022, 15:50 last edited by
          #4

          It means you're missing a platform plugin in your deployed app directory. That's weird. windeployqt should copy it for you.
          Anyway, your app directory should look something like this:

          [your app dir]
             YourApp.exe
             Qt6Core.dll
             ... //other dlls
             [platforms]
                qwindows.dll
             [styles]
                qwindowsvistastyle.dll
          

          You need at least the platforms plugin dll for your app to work. You'll also need the styles dll if you use any gui. You will find them in your Qt installation directory in plugins directory. There are more dlls there e.g. database and imageformats plugins if you use any. They should be deployed along your exe in subfolders named the same as in the plugins directory.

          I'm making 32bit app for Windows because I use a dll from a 3rd party company and it doesn't work with 64bit.

          Ah, I get it. It's a shame this still happens in this day and age :(

          1 Reply Last reply
          1
          • L Offline
            L Offline
            Linhares
            wrote on 18 Aug 2022, 15:45 last edited by
            #5

            I managed to solve the problem by reinstalling Qt on my computer. Thanks for the help!

            1 Reply Last reply
            0

            1/5

            15 Aug 2022, 19:50

            • Login

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