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. Deployed exe not working on same computer
QtWS25 Last Chance

Deployed exe not working on same computer

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 200 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.
  • P Offline
    P Offline
    PavloPonomarov
    wrote on last edited by
    #1

    Hello. I compiled my project with Release profile. Somehow though I chose Release in shadow build folder it creates both debug and release folders and the release one is completely empty. But in the debug folder I could find my executable.
    Then I placed it in separate folder and using mingw terminal used windeployqt.exe on it. It created me a list of DLL and folders inside the directory and according to different tutorials I've seen on the internet my application should launch from that directory. But it doesn't. I get no error messages, just nothing happens.
    I've tried another method where I manually copied all the DLLs into the folder with my executable, but I get the same result.
    This post is about the same issue, but in my case windeployqt.exe already created those files that helped him.
    Any suggestions would be appreciated.

    JKSHJ 1 Reply Last reply
    0
    • P PavloPonomarov

      Hello. I compiled my project with Release profile. Somehow though I chose Release in shadow build folder it creates both debug and release folders and the release one is completely empty. But in the debug folder I could find my executable.
      Then I placed it in separate folder and using mingw terminal used windeployqt.exe on it. It created me a list of DLL and folders inside the directory and according to different tutorials I've seen on the internet my application should launch from that directory. But it doesn't. I get no error messages, just nothing happens.
      I've tried another method where I manually copied all the DLLs into the folder with my executable, but I get the same result.
      This post is about the same issue, but in my case windeployqt.exe already created those files that helped him.
      Any suggestions would be appreciated.

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      @PavloPonomarov said in Deployed exe not working on same computer:

      Hello. I compiled my project with Release profile. Somehow though I chose Release in shadow build folder it creates both debug and release folders and the release one is completely empty. But in the debug folder I could find my executable.

      Sounds like something has gone wrong at this step. I wouldn't try to deploy the app until you can get a Release build to appear in the release folder.

      Questions:

      1. If you create a new "Hello world" app, can you get a Release build to appear in the release folder?
      2. If "Yes" to #1, can you deploy that app and run it?
      3. What external libraries (if any) are used by your project?
      4. If your project uses Qt Quick/QML, did you deploy the QML files (including qmldir)? See https://wiki.qt.io/Deploy_an_Application_on_Windows

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      4
      • B Offline
        B Offline
        Bonnie
        wrote on last edited by Bonnie
        #3

        @PavloPonomarov said in Deployed exe not working on same computer:

        Somehow though I chose Release in shadow build folder it creates both debug and release folders and the release one is completely empty. But in the debug folder I could find my executable.

        Are you sure you are looking at the right folder?
        If you configure the project by the default configuration of Qt Creator and have built in both debug and release, there should be two building folders, one is named build-xxx-Debug and the other is build-xxx-Release.
        Both will have debug and release subfolders in them, but the build-xxx-Debug one will have an empty release and the build-xxx-Release one will have an empty debug.

        But this is a different issue from deployment.
        Are you able to run your application successfully from Qt creator before having called windeployqt.exe?

        1 Reply Last reply
        5
        • P Offline
          P Offline
          PavloPonomarov
          wrote on last edited by
          #4

          @Bonnie said in Deployed exe not working on same computer:

          Both will have debug and release subfolders in them, but the build-xxx-Debug one will have an empty release and the build-xxx-Release one will have an empty debug.

          Exactly. I have two folders - build-xxx-Debug and build-xxx-Release, but both of them have executables in debug and empty release

          Are you able to run your application successfully from Qt creator before having called windeployqt.exe?

          Yes, it compiles and runs without problems

          @JKSH said in Deployed exe not working on same computer:

          1. If you create a new "Hello world" app, can you get a Release build to appear in the release folder?
          2. If "Yes" to #1, can you deploy that app and run it?

          I took an example and made a release version. It created executable in release and I could deploy and run it. I have compared Release Build Settings from the example and from my project - they are equal.

          1. What external libraries (if any) are used by your project?

          I don't use external libraries

          1. If your project uses Qt Quick/QML, did you deploy the QML files (including qmldir)? See https://wiki.qt.io/Deploy_an_Application_on_Windows

          Thanks for this link. I do use Qml and I just tried "quick and dirty" method and it worked! So now I'll have to do the "clean up". Still strange that Release version creates executable in debug directory though

          JKSHJ 1 Reply Last reply
          0
          • P PavloPonomarov

            @Bonnie said in Deployed exe not working on same computer:

            Both will have debug and release subfolders in them, but the build-xxx-Debug one will have an empty release and the build-xxx-Release one will have an empty debug.

            Exactly. I have two folders - build-xxx-Debug and build-xxx-Release, but both of them have executables in debug and empty release

            Are you able to run your application successfully from Qt creator before having called windeployqt.exe?

            Yes, it compiles and runs without problems

            @JKSH said in Deployed exe not working on same computer:

            1. If you create a new "Hello world" app, can you get a Release build to appear in the release folder?
            2. If "Yes" to #1, can you deploy that app and run it?

            I took an example and made a release version. It created executable in release and I could deploy and run it. I have compared Release Build Settings from the example and from my project - they are equal.

            1. What external libraries (if any) are used by your project?

            I don't use external libraries

            1. If your project uses Qt Quick/QML, did you deploy the QML files (including qmldir)? See https://wiki.qt.io/Deploy_an_Application_on_Windows

            Thanks for this link. I do use Qml and I just tried "quick and dirty" method and it worked! So now I'll have to do the "clean up". Still strange that Release version creates executable in debug directory though

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            @PavloPonomarov said in Deployed exe not working on same computer:

            I do use Qml and I just tried "quick and dirty" method and it worked!

            Awesome :)

            You were probably missing QML-related files.

            Try the --qmldir and --qmlimport options of windeployqt

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            1

            • Login

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