Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Deploying Qt c++ mingw application

    General and Desktop
    3
    10
    3376
    Loading More Posts
    • 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.
    • K
      Kushan last edited by

      I have created a QT application using Qt creator ide according to Mingw format! when I searched the web there is no proper way to deploy it! How can I achieve this?

      1 Reply Last reply Reply Quote 0
      • yuvaram
        yuvaram last edited by

        Hi @Kushan
        Do you want to create executable? or Want to run your application

        Yuvaram Aligeti
        Embedded Qt Developer
        : )

        K 1 Reply Last reply Reply Quote 0
        • K
          Kushan @yuvaram last edited by

          @yuvaram create an executeble

          yuvaram 1 Reply Last reply Reply Quote 0
          • yuvaram
            yuvaram @Kushan last edited by

            @Kushan
            This link should help you

            http://doc.qt.io/qtcreator/creator-build-example-application.html

            Yuvaram Aligeti
            Embedded Qt Developer
            : )

            K 1 Reply Last reply Reply Quote 0
            • K
              Kushan @yuvaram last edited by

              @yuvaram This is just running my app right? not making an executable :(

              yuvaram raven-worx 2 Replies Last reply Reply Quote 0
              • yuvaram
                yuvaram @Kushan last edited by yuvaram

                @Kushan
                After build a binary is created "sample.exe", by using RUN option binary can be executed.
                Inorder to make Executable without depending on Qt creator. ( When it uses Qt creator, internally it links all the modules which are specified in .pro file).

                For making executable sample.exe needs all the Qt modules used libraries to run independently.

                Use dependency walker http://www.dependencywalker.com/ which shows list of libraries used in "sample.exe".

                1. By above software - list of libraries used.

                2. Need to add all the libraries in .pro file.
                  DESTDIR = "../../"
                  dlls.path += $${DESTDIR}
                  dlls.files += $$[QT_INSTALL_BINS]/Qt5Core.dll
                  dlls.files += $$[QT_INSTALL_BINS]/Qt5Gui.dll
                  INSTALLS += dlls

                3. INSTALL argument need to added as command line.
                  Projects (within tool bar icon) > add build step (drop down option ) > make >
                  In "make arguments:" add "INSTALL"

                4. Back to EDIT option, which shows project. Qmake , rebuild and run.

                This should help to run sample.exe without Qt creator.

                Yuvaram Aligeti
                Embedded Qt Developer
                : )

                K 1 Reply Last reply Reply Quote 0
                • raven-worx
                  raven-worx Moderators @Kushan last edited by

                  @Kushan said in Deploying Qt c++ mingw application:

                  @yuvaram This is just running my app right? not making an executable :(

                  running an application already needs an executable to run.
                  The path where the exe is built is written to the console in QtCreator.

                  Test it properly in QtCreator and once you are finished and ready for deployment, the most easiest is to copy the exe to a separate folder and run QTDIR/bin/windeployqt on the exe. This copies all needed dlls beside the exe.

                  Further reading.

                  --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                  If you have a question please use the forum so others can benefit from the solution in the future

                  1 Reply Last reply Reply Quote 2
                  • K
                    Kushan @yuvaram last edited by

                    @yuvaram Thanx my release folder is empty only the debug folder has an executable do I have to use it?

                    raven-worx yuvaram 2 Replies Last reply Reply Quote 0
                    • raven-worx
                      raven-worx Moderators @Kushan last edited by raven-worx

                      @Kushan
                      press the button above the "run" and "debug run" button. There you will see how to change between release and debug.

                      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                      If you have a question please use the forum so others can benefit from the solution in the future

                      1 Reply Last reply Reply Quote 1
                      • yuvaram
                        yuvaram @Kushan last edited by

                        @Kushan change build type from debug to release

                        Yuvaram Aligeti
                        Embedded Qt Developer
                        : )

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post