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. QT5.11.1 compile with static

QT5.11.1 compile with static

Scheduled Pinned Locked Moved Unsolved General and Desktop
14 Posts 5 Posters 2.1k Views 2 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.
  • Sam1990S Offline
    Sam1990S Offline
    Sam1990
    wrote on last edited by
    #1

    Hi,
    Guys,i just installed Qt5.11.1 of windows version on my laptop,application I compiled through Qt5.11.1 can be ran only on my laptop under OS Win10 64 bits,can not run on their PC with platform win10,so I need compile it with static method,it can be released to run on any win10 platform,but I don't know way to static compile QT5.11.1

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Why not just make a deployment folder
      http://www.tripleboot.org/?p=138
      http://doc.qt.io/qt-5/windows-deployment.html

      use the Windows Deployment Tool to help copy the needed Dlls.

      Sam1990S 1 Reply Last reply
      2
      • mrjjM mrjj

        Hi
        Why not just make a deployment folder
        http://www.tripleboot.org/?p=138
        http://doc.qt.io/qt-5/windows-deployment.html

        use the Windows Deployment Tool to help copy the needed Dlls.

        Sam1990S Offline
        Sam1990S Offline
        Sam1990
        wrote on last edited by
        #3

        @mrjj Yes, i tried it ,but it does not work,still prompt error that missed some dlls when ran on XP or Win7

        mrjjM Cobra91151C 2 Replies Last reply
        0
        • Sam1990S Sam1990

          @mrjj Yes, i tried it ,but it does not work,still prompt error that missed some dlls when ran on XP or Win7

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @Sam1990
          Thats is mostly likely missing compiler run time
          for either mingw runtime or the visual studio runtime.
          Win / and xp dot have vs runtime installed from start, only win 10
          as far as i know.

          Update: seems not even supported.

          1 Reply Last reply
          0
          • Sam1990S Sam1990

            @mrjj Yes, i tried it ,but it does not work,still prompt error that missed some dlls when ran on XP or Win7

            Cobra91151C Offline
            Cobra91151C Offline
            Cobra91151
            wrote on last edited by
            #5

            @Sam1990

            Hi! Qt 5.11.1 doesn't support Windows XP and Windows Vista. I use the latest Qt 5.9.6 and it works with Windows Vista fine. Here is the official answer: Windows Vista issue. For static Qt compilation you need to purchase the license to get the paid Qt version.

            1 Reply Last reply
            1
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Cobra91151 static compilation doesn't require a commercial license, however it comes with licensing constraints that you are not subject to if you have a commercial license.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              Cobra91151C 1 Reply Last reply
              2
              • SGaistS SGaist

                @Cobra91151 static compilation doesn't require a commercial license, however it comes with licensing constraints that you are not subject to if you have a commercial license.

                Cobra91151C Offline
                Cobra91151C Offline
                Cobra91151
                wrote on last edited by
                #7

                @SGaist

                Hi! So it means that I can compile Qt from the source with static compilation and use it to create projects? Thanks.

                mrjjM 1 Reply Last reply
                0
                • Cobra91151C Cobra91151

                  @SGaist

                  Hi! So it means that I can compile Qt from the source with static compilation and use it to create projects? Thanks.

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by mrjj
                  #8

                  @Cobra91151

                  Hi. yes you can use static compilation
                  IF your code is Open Source and freely available.
                  But if closed source, then you need license. ( or dynamic link)

                  To be more exact.
                  to obey LGLP , end use must be able to change the Qt version used.
                  So you can
                  1: provide source
                  2: use dynamic linking
                  3: provide all .o files used to produce the .exe with static linking.

                  Cobra91151C 2 Replies Last reply
                  1
                  • mrjjM mrjj

                    @Cobra91151

                    Hi. yes you can use static compilation
                    IF your code is Open Source and freely available.
                    But if closed source, then you need license. ( or dynamic link)

                    To be more exact.
                    to obey LGLP , end use must be able to change the Qt version used.
                    So you can
                    1: provide source
                    2: use dynamic linking
                    3: provide all .o files used to produce the .exe with static linking.

                    Cobra91151C Offline
                    Cobra91151C Offline
                    Cobra91151
                    wrote on last edited by Cobra91151
                    #9

                    @mrjj

                    Hi! I want to create my custom online installer for the projects. I used Inno Setup (Delphi) for that, but with Qt it will be much better. So I only need to make it open source or provide the link to Qt website? Thanks.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      If you want to use the LGPL license to keep your code to yourself and use a static version of Qt, you have to provide all the build objects so that your user can re-create the application while linking to the version of Qt they want.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      2
                      • mrjjM mrjj

                        @Cobra91151

                        Hi. yes you can use static compilation
                        IF your code is Open Source and freely available.
                        But if closed source, then you need license. ( or dynamic link)

                        To be more exact.
                        to obey LGLP , end use must be able to change the Qt version used.
                        So you can
                        1: provide source
                        2: use dynamic linking
                        3: provide all .o files used to produce the .exe with static linking.

                        Cobra91151C Offline
                        Cobra91151C Offline
                        Cobra91151
                        wrote on last edited by Cobra91151
                        #11

                        @mrjj

                        Installer with dynamic linking is not well, because it should be 1 executable, like with Inno Setup. So I can provide the source code or all objects (.obj) files in my case? Thanks.

                        mrjjM jsulmJ 2 Replies Last reply
                        0
                        • Cobra91151C Cobra91151

                          @mrjj

                          Installer with dynamic linking is not well, because it should be 1 executable, like with Inno Setup. So I can provide the source code or all objects (.obj) files in my case? Thanks.

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @Cobra91151

                          Yes that is the general understanding. That should allow end user to use other
                          version of Qt. ( not sure How, but in theory)

                          However, be much cooler if you could do as open source :)
                          (for the installer)

                          1 Reply Last reply
                          2
                          • Cobra91151C Cobra91151

                            @mrjj

                            Installer with dynamic linking is not well, because it should be 1 executable, like with Inno Setup. So I can provide the source code or all objects (.obj) files in my case? Thanks.

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by jsulm
                            #13

                            @Cobra91151 said in QT5.11.1 compile with static:

                            Installer with dynamic linking is not well, because it should be 1 executable, like with Inno Setup

                            The installer can still be just one file, but installing software consisting of several files (do you confuse installer and your app?). In my opinion it is way easier to create an installer with dynamically linked Qt as to hack around with own static build of Qt. Did you ever build Qt?

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            Cobra91151C 1 Reply Last reply
                            0
                            • jsulmJ jsulm

                              @Cobra91151 said in QT5.11.1 compile with static:

                              Installer with dynamic linking is not well, because it should be 1 executable, like with Inno Setup

                              The installer can still be just one file, but installing software consisting of several files (do you confuse installer and your app?). In my opinion it is way easier to create an installer with dynamically linked Qt as to hack around with own static build of Qt. Did you ever build Qt?

                              Cobra91151C Offline
                              Cobra91151C Offline
                              Cobra91151
                              wrote on last edited by
                              #14

                              @jsulm

                              Hi! Yes, I built the Qt several times. I'm not confused. Apps was build with dynamic linking. Also I can build the same way installer and add it for example to zip archive file to distribute. But I can build one executable with Inno Setup and distribute it, which will be much better.

                              I can use Qt Installer Framework to build the installer but I want to customize it better. I want to know, how you can build the installer with 1 executable file using dynamic linking? I think it's not possible. Thanks.

                              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