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. How do I create a static library to deploy programs on windows machines?
Forum Updated to NodeBB v4.3 + New Features

How do I create a static library to deploy programs on windows machines?

Scheduled Pinned Locked Moved Installation and Deployment
9 Posts 2 Posters 3.1k Views 1 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.
  • T Offline
    T Offline
    Trenelly
    wrote on last edited by
    #1

    I am using Qt Creator 3.1.2 (opensource) on a Win7 64 bit machine.
    I have created a simple app using C++ with the mingw compiler.
    I would like to create a static library in the C:\Qt\SataticApps folder.
    I have tried using the following command:

    C:\Qt\5.3\mingw482_32>.\configure -static -platform win32-g++ -prefix C:\Qt\StaticApps

    which gives the following error:

    Error: Could not find licheck.exe
    Try re-installing.

    Any ideas out there?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Please see "the deployment guide":http://qt-project.org/doc/qt-5/windows-deployment.html#static-linking.

      You need to build Qt libraries statically (download the source code, compile), and then build your application statically, too.

      Please be aware that you are (almost) not allowed to do this under LGPL license: you need either GPL or commercial one.

      (Z(:^

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

        How do I get a GPL?

        1 Reply Last reply
        0
        • T Offline
          T Offline
          Trenelly
          wrote on last edited by
          #4

          Is that why I get an error from configure that says it can't find licheck.exe?

          1 Reply Last reply
          0
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #5

            No, that error is unrelated.

            The source code is the same for LGPL and GPL versions (I think it's also the same for commercial, but am not sure). The choice is that you either publish your application under GPL (in which case you will use Qt under GPL license), or any other license of your choice, in which case you have to obey the rules of LGPL.

            (Z(:^

            1 Reply Last reply
            0
            • T Offline
              T Offline
              Trenelly
              wrote on last edited by
              #6

              I have read the deployment guide. That is where I got the command that I listed in my original post.

              I was attempting to configure the build process to create a static version of the libraries as described in the deployment guide.

              I'll rephrase my question: why can I not create a static version of Qt as described in the deployment guide? Is the command I issued wrong in some way?

              1 Reply Last reply
              0
              • sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #7

                You are most probably trying to configure sources you've acquired through the installer. Those are for debugger introspection, and not for Qt building.

                You need to download Qt source code, and compile it. As a reference, you can use "this guide":http://qt-project.org/wiki/Building_Qt_5_from_Git, just skip the git part if you prefer to download Qt source code from the source package ("download link":http://download.qt-project.org/official_releases/qt/5.3/5.3.1/single/qt-everywhere-opensource-src-5.3.1.zip).

                By combining those 2 sources you should get a result that works :-)

                (Z(:^

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  Trenelly
                  wrote on last edited by
                  #8

                  Many thanks.
                  You got me looking in the right place.

                  Found I needed to use win32:LIBS "path/to/lib/file.a"

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    Trenelly
                    wrote on last edited by
                    #9

                    Sorry. That should be win32:LIBS += "c:/path/to/lib/file.a"

                    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