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. Application Static Linking
Forum Updated to NodeBB v4.3 + New Features

Application Static Linking

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 2.3k 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.
  • A Offline
    A Offline
    Asm_x64
    wrote on last edited by
    #1

    Version: Qt 5.1 - Win64 binary package

    Hello everybody,

    How to direct qmake to link an application against the static version of a Qt library (when both versions are included in a Win64 package) ?

    Thanks, in advance, for your help.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      None of the binary distributions include a static version of Qt. If you have not built Qt for yourself then you do not have a static Qt.

      Once you have a static Qt library build then you use the qmake from that library build to process your pro file. The resulting program will be linked against the static Qt library.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Asm_x64
        wrote on last edited by
        #3

        Thank you for your answer.
        Now, what' s the purpose of the object file libraries residing in the package' s "lib" directory ?

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dbzhang800
          wrote on last edited by
          #4

          [quote author="Asm_x64" date="1373603748"]
          Now, what' s the purpose of the object file libraries residing in the package' s "lib" directory ?[/quote]

          You mean the "import library" such as Qt5Core.lib ?

          The import libraries are need by MSVC when you want to link to shared libraries such as Qt5Core.dll.
          *.lib is used in link time, while *.dll is used in running time.
          In order word, you application can be compiled successfully even when the *.dll doesn't exist.


          BTW, the term "import library" doesn't exist in GCC world. MinGW can work with or without the "import library" .

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Asm_x64
            wrote on last edited by
            #5

            My question was stupid. Sorry.
            However, Windows 7 labels both archives and import libraries as "Object File Library", which can be misleading if you jump to conclusions as I did.
            Thanks for your reply.

            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