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. Qt does not find the .exe file
QtWS25 Last Chance

Qt does not find the .exe file

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
12 Posts 4 Posters 5.7k 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.
  • C Offline
    C Offline
    CDS95
    wrote on last edited by CDS95
    #1

    Hi everybody,

    When I try to run my app on desktop I got the following error:
    Workspace\build-FinalDemo-Desktop_Qt_5_9_5_MinGW_32bit-Debug\FinalDemo.exe does not exist.

    I looked on the foldier and I found the .exe file in the debug folder, so in the path :
    Workspace\build-FinalDemo-Desktop_Qt_5_9_5_MinGW_32bit-Debug\debug\FinalDemo.exe

    If I manually move the file into the previous path, I can run the app on Qt creator. But as soon as I change something (add new code) and run it again, it automatically creates a new .exe file inside the \debug folder and when running again the app, it uses the previous .exe file, the one I moved manually (whitout the changes).

    This only happends when I also run the app on an Android Emulator.
    If I start a project and only run it on desktop, I dont have this problem.

    Hope there's a way to fix this, if not I have to move the .exe file everytime I made a change on the code.

    Thank you.

    K 1 Reply Last reply
    0
    • C CDS95

      Hi everybody,

      When I try to run my app on desktop I got the following error:
      Workspace\build-FinalDemo-Desktop_Qt_5_9_5_MinGW_32bit-Debug\FinalDemo.exe does not exist.

      I looked on the foldier and I found the .exe file in the debug folder, so in the path :
      Workspace\build-FinalDemo-Desktop_Qt_5_9_5_MinGW_32bit-Debug\debug\FinalDemo.exe

      If I manually move the file into the previous path, I can run the app on Qt creator. But as soon as I change something (add new code) and run it again, it automatically creates a new .exe file inside the \debug folder and when running again the app, it uses the previous .exe file, the one I moved manually (whitout the changes).

      This only happends when I also run the app on an Android Emulator.
      If I start a project and only run it on desktop, I dont have this problem.

      Hope there's a way to fix this, if not I have to move the .exe file everytime I made a change on the code.

      Thank you.

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @CDS95

      Hi and welcome to devnet forum

      It looks a bit like mix up things here.

      @CDS95 said in Qt does not find the .exe file:

      When I try to run my app on desktop I got the following error:
      Workspace\build-FinalDemo-Desktop_Qt_5_9_5_MinGW_32bit-Debug\FinalDemo.exe does not exist.

      I looked on the foldier and I found the .exe file in the debug folder, so in the path :
      Workspace\build-FinalDemo-Desktop_Qt_5_9_5_MinGW_32bit-Debug\debug\FinalDemo.exe

      All above refers to the compiled application which can run on windows only. That looks fine besides the fact that you might have removed the drive letter for posting. Otherwise if "Workspace" is an environment variable, I am not sure if this is always handled properly. I would suggest to use a hardwired drive letter to pinpoint the problem.

      If I manually move the file into the previous path, I can run the app on Qt creator. But as soon as I change something (add new code) and run it again, it automatically creates a new .exe file inside the \debug folder and when running again the app, it uses the previous .exe file, the one I moved manually (whitout the changes).

      That correlates that there might be a drive letter issue as noted above.

      This only happends when I also run the app on an Android Emulator.
      If I start a project and only run it on desktop, I dont have this problem.

      With Android you will not have an exe as result. So if the problem is when you somehow activate Android Emulator. There might be a misunderstanding.

      Therefore, please clarify where (OS?) you like to run what (windows exe or Android app?).

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      2
      • C Offline
        C Offline
        CDS95
        wrote on last edited by CDS95
        #3

        Hi, thank you for your answer.

        • the full path is C:\Users\Jaime.Prohens.EXT\Documents\Workspace\build-FinalDemo-Desktop_Qt_5_9_5_MinGW_32bit-Debug
          And I am using Windows 7

        • I did some more test and here's the problem:
          Every time I run the app on Android emulator (I start the emulator on Android Studio ) it works prefectly. But when I swicht to "Desktop Qt 5.9.5 MinGW 32bit" to run it again on desktop, I have the "can't find .exe file". I figured out that closing Qt and opening it again fix the problem, because Qt automatically changes the exe path to C:\Users\Jaime.Prohens.EXT\Documents\Workspace\build-FinalDemo-Desktop_Qt_5_9_5_MinGW_32bit-Debug\debug

        Do I have to close and open again Qt every time I switch from android to desktop?

        And I forgot to say that the main goal is to build the app for desktop AND android

        K 1 Reply Last reply
        0
        • C CDS95

          Hi, thank you for your answer.

          • the full path is C:\Users\Jaime.Prohens.EXT\Documents\Workspace\build-FinalDemo-Desktop_Qt_5_9_5_MinGW_32bit-Debug
            And I am using Windows 7

          • I did some more test and here's the problem:
            Every time I run the app on Android emulator (I start the emulator on Android Studio ) it works prefectly. But when I swicht to "Desktop Qt 5.9.5 MinGW 32bit" to run it again on desktop, I have the "can't find .exe file". I figured out that closing Qt and opening it again fix the problem, because Qt automatically changes the exe path to C:\Users\Jaime.Prohens.EXT\Documents\Workspace\build-FinalDemo-Desktop_Qt_5_9_5_MinGW_32bit-Debug\debug

          Do I have to close and open again Qt every time I switch from android to desktop?

          And I forgot to say that the main goal is to build the app for desktop AND android

          K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          @CDS95

          I assume you are using Qt creator as IDE and switch in the lower left the tool chain.

          It may help when you rerun qmake (right click on project and "run qmake") when you have switched. Eventually rebuild too.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • C Offline
            C Offline
            CDS95
            wrote on last edited by
            #5

            @koahnig

            Yes, I am using Qt creator as IDE and I switch to android compilation/running on the lower left chain as you said.
            I already tryed to run qmake qhen facing this problem and rebuild the app, but it doesnt fix the issue.

            As I mentioned in the last post, the only way to fix this problem is by closing Qt creator and start it again.

            K 1 Reply Last reply
            0
            • C CDS95

              @koahnig

              Yes, I am using Qt creator as IDE and I switch to android compilation/running on the lower left chain as you said.
              I already tryed to run qmake qhen facing this problem and rebuild the app, but it doesnt fix the issue.

              As I mentioned in the last post, the only way to fix this problem is by closing Qt creator and start it again.

              K Offline
              K Offline
              koahnig
              wrote on last edited by
              #6

              @CDS95

              You can check on JIRA if there is a bug report. Or file one yourself.

              You can also check on android-qt google group, if someone experienced the same problem.

              Vote the answer(s) that helped you to solve your issue(s)

              1 Reply Last reply
              0
              • J.HilkJ Offline
                J.HilkJ Offline
                J.Hilk
                Moderators
                wrote on last edited by
                #7

                I can actually confirm that behaviour in my installation of CtCreator 4.6 one on Windows 10, on Ubuntu,and on MacOs this works fine.

                I haven't checked on the bugtracker jet, i find it difficult to search for specific bugs.

                I think this may just be an oversight, because, IIRC, Windows is the only OS where qmake creates a debug and release folder each inside the actual debug and release path.


                Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                Q: What's that?
                A: It's blue light.
                Q: What does it do?
                A: It turns blue.

                K 1 Reply Last reply
                1
                • J.HilkJ J.Hilk

                  I can actually confirm that behaviour in my installation of CtCreator 4.6 one on Windows 10, on Ubuntu,and on MacOs this works fine.

                  I haven't checked on the bugtracker jet, i find it difficult to search for specific bugs.

                  I think this may just be an oversight, because, IIRC, Windows is the only OS where qmake creates a debug and release folder each inside the actual debug and release path.

                  K Offline
                  K Offline
                  koahnig
                  wrote on last edited by
                  #8

                  @J.Hilk

                  the differentiation between debug and release is IIRC as well a windows issue. But that shall be cured by rerun of qmake. At least in my cases it cures, but I am typically switching between debug and release and applications only. The change of tool chain is not done often.

                  I thought I am the only having trouble to get an overview on JIRA. Probably it would improve by daily use, but that is not the point for standard users.

                  Vote the answer(s) that helped you to solve your issue(s)

                  1 Reply Last reply
                  0
                  • aha_1980A Offline
                    aha_1980A Offline
                    aha_1980
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @koahnig and @J-Hilk:

                    Regarding the extra debug and release folders I asked two years ago: https://bugreports.qt.io/browse/QTBUG-52347

                    The workaround is to set CONFIG-=debug_and_release in the project file, and to take care to use shadow building because debug and release objects cannot be mixed on Windows.

                    I added this option to all my projects and didn't see problems with that so far.

                    Qt has to stay free or it will die.

                    J.HilkJ K 2 Replies Last reply
                    4
                    • aha_1980A aha_1980

                      @koahnig and @J-Hilk:

                      Regarding the extra debug and release folders I asked two years ago: https://bugreports.qt.io/browse/QTBUG-52347

                      The workaround is to set CONFIG-=debug_and_release in the project file, and to take care to use shadow building because debug and release objects cannot be mixed on Windows.

                      I added this option to all my projects and didn't see problems with that so far.

                      J.HilkJ Offline
                      J.HilkJ Offline
                      J.Hilk
                      Moderators
                      wrote on last edited by
                      #10

                      @aha_1980
                      Well, thank you, that defenitly fixes the issue for me.


                      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                      Q: What's that?
                      A: It's blue light.
                      Q: What does it do?
                      A: It turns blue.

                      1 Reply Last reply
                      0
                      • aha_1980A aha_1980

                        @koahnig and @J-Hilk:

                        Regarding the extra debug and release folders I asked two years ago: https://bugreports.qt.io/browse/QTBUG-52347

                        The workaround is to set CONFIG-=debug_and_release in the project file, and to take care to use shadow building because debug and release objects cannot be mixed on Windows.

                        I added this option to all my projects and didn't see problems with that so far.

                        K Offline
                        K Offline
                        koahnig
                        wrote on last edited by
                        #11

                        @aha_1980

                        Not really sure if this will an issue for me.

                        Can you freely switch forth and back with the left pane for compilation selection (debug/release) and the project is compiled as required?
                        Maybe it does?

                        Vote the answer(s) that helped you to solve your issue(s)

                        aha_1980A 1 Reply Last reply
                        0
                        • K koahnig

                          @aha_1980

                          Not really sure if this will an issue for me.

                          Can you freely switch forth and back with the left pane for compilation selection (debug/release) and the project is compiled as required?
                          Maybe it does?

                          aha_1980A Offline
                          aha_1980A Offline
                          aha_1980
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @koahnig said in Qt does not find the .exe file:

                          Can you freely switch forth and back with the left pane for compilation selection (debug/release) and the project is compiled as required?

                          Yes. And I can also switch betwenn MSVC and MinGW.

                          Qt has to stay free or it will die.

                          1 Reply Last reply
                          2

                          • Login

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