Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Application runs in Qt Creator, but not as an executable
QtWS25 Last Chance

Application runs in Qt Creator, but not as an executable

Scheduled Pinned Locked Moved Installation and Deployment
8 Posts 4 Posters 10.3k 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.
  • T Offline
    T Offline
    twf0001
    wrote on last edited by
    #1

    When I run my program within Qt Creator, I get no errors, however when i try and use the executable created during the build process outside the creator, I get this error:

    The application was unable to start correctly (0xc000007b). Click OK to close the application.

    I am using mingw-w64 with Qt 4.7.4 and Qt Creator 2.4.1

    From what I have read online it seems that it is a 32/64 bit compatibility issue, and I am just unsure on how to fix it.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      Check the environment Qt Creator uses to run your application: Projects->Run Settings, Run Enviromnent there.

      Make sure you have similar settings in the command line you run your application in. Most important is most likely to set PATH correctly, as that defines which libraries windows is going to see.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        twf0001
        wrote on last edited by
        #3

        I checked the PATH environment variable, it has the locations of MinGW64 and msys, I am not sure what else it needs.

        I did notice that in the about dialog in Qt Creator it says that is based on Qt 4.7.4 (32 bit) maybe this could be a problem?

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          No, Qt Creator is shipped with its own Qt which is of version 4.7.4. That makes it harder to break creator when mucking around the Qts installed by the Qt SDK;-)

          Well, creator does not do any magic: It does set the working directory, the application, the command line arguments you set up and the environment as listed in the run settings and asks the OS to start the whole thing.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            twf0001
            wrote on last edited by
            #5

            I figured it out! It was the PATH environment variable after all, I was missing something in my computers version that was in Qt Creators version.

            Thanks for your help

            1 Reply Last reply
            0
            • C Offline
              C Offline
              canismajor
              wrote on last edited by
              #6

              twf0001, would you mind telling me what was missing from your PATH?

              I'm having the same issue and the other solutions posted on this forum look downright scary! So I'd like to try your solution first.

              1 Reply Last reply
              0
              • C Offline
                C Offline
                canismajor
                wrote on last edited by
                #7

                I should have added that other than the Qt path ("C:\Dev\Qt\Qt5.0.2\5.0.2\msvc2012_64\bin") the Qt and Windows paths on my machine are identical.

                I can't imagine a deployed application being dependent on the location of Qt, so there must be another cause. I've already gathered together all of the Qt (and other) DLLs identified by Dependency Walker.

                I only upgraded to the VS 2012 64-bit toolkit last week and this is the first time I've tried to deploy my project as a 64-bit application. It was working under the old VS 2010 toolkit.

                I'm on a Windows 8 machine.

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  vittalonline
                  wrote on last edited by
                  #8

                  if you use 32 bit for app exe system, must build once that source code in 32 bit system

                  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