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. Static build Qt application with dynamic link with 3rd party library.
Forum Updated to NodeBB v4.3 + New Features

Static build Qt application with dynamic link with 3rd party library.

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 1.1k 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.
  • S Offline
    S Offline
    samdol
    wrote on 15 Feb 2017, 19:31 last edited by samdol
    #1

    Hi,

    If I build an application by static Qt compile, do I have to include 3rd party library statically not dynamically?
    And if I build an application by dynamic Qt compile, do I have to include 3rd party library dynamically not statically?

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VRonin
      wrote on 15 Feb 2017, 19:38 last edited by
      #2

      Nope, the link method of a library does nothing for the linking method of other libraries. You are free to mix and match as much as you want.

      The exception is cross dependency:

      • Library A links to Library B dynamically
      • Application C links to library B statically and to library A
      • Bad things happen

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      S 1 Reply Last reply 16 Feb 2017, 10:13
      1
      • V VRonin
        15 Feb 2017, 19:38

        Nope, the link method of a library does nothing for the linking method of other libraries. You are free to mix and match as much as you want.

        The exception is cross dependency:

        • Library A links to Library B dynamically
        • Application C links to library B statically and to library A
        • Bad things happen
        S Offline
        S Offline
        samdol
        wrote on 16 Feb 2017, 10:13 last edited by
        #3

        @VRonin

        Thank you. Do you mean that:
        App <--S--> libA <--S--> libB (O)
        App <--D--> libA <--D--> libB (O)
        App <--D--> libA <--S--> libB (O)
        App <--S--> libA <--D--> libB (X)

        1 Reply Last reply
        0
        • V Offline
          V Offline
          VRonin
          wrote on 16 Feb 2017, 10:46 last edited by VRonin
          #4

          not quite, all your cases are ok

                 ┌ ⇒ D ⇒ libA ⇒ D ⇒ libB
          Ok: App┤
                 └ ⇒ D ⇒ libB
          
                 ┌ ⇒ S ⇒ libA ⇒ D ⇒ libB
          Ok: App┤
                 └ ⇒ D ⇒ libB
          
                 ┌ ⇒ S ⇒ libA ⇒ S ⇒ libB
          Ok: App┤
                 └ ⇒ S ⇒ libB
          
                 ┌ ⇒ D ⇒ libA ⇒ D ⇒ libB
          No: App┤
                 └ ⇒ S ⇒ libB
          

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          S 1 Reply Last reply 17 Feb 2017, 06:34
          2
          • V VRonin
            16 Feb 2017, 10:46

            not quite, all your cases are ok

                   ┌ ⇒ D ⇒ libA ⇒ D ⇒ libB
            Ok: App┤
                   └ ⇒ D ⇒ libB
            
                   ┌ ⇒ S ⇒ libA ⇒ D ⇒ libB
            Ok: App┤
                   └ ⇒ D ⇒ libB
            
                   ┌ ⇒ S ⇒ libA ⇒ S ⇒ libB
            Ok: App┤
                   └ ⇒ S ⇒ libB
            
                   ┌ ⇒ D ⇒ libA ⇒ D ⇒ libB
            No: App┤
                   └ ⇒ S ⇒ libB
            
            S Offline
            S Offline
            samdol
            wrote on 17 Feb 2017, 06:34 last edited by samdol
            #5

            @VRonin
            How about following thee cases?

               ┌ ⇒ D ⇒ libA ⇒ S ⇒ libB
            App┤
               └ ⇒ S ⇒ libB
            
               ┌ ⇒ D ⇒ libA ⇒ S ⇒ libB
            App┤
               └ ⇒ D ⇒ libB
            
               ┌ ⇒ S ⇒ libA ⇒ S ⇒ libB
            App┤
               └ ⇒ D ⇒ libB
            
            1 Reply Last reply
            0
            • V Offline
              V Offline
              VRonin
              wrote on 17 Feb 2017, 07:56 last edited by
              #6
              1. I think it's ok
              2. No
              3. No

              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
              ~Napoleon Bonaparte

              On a crusade to banish setIndexWidget() from the holy land of Qt

              S 1 Reply Last reply 17 Feb 2017, 21:12
              0
              • V VRonin
                17 Feb 2017, 07:56
                1. I think it's ok
                2. No
                3. No
                S Offline
                S Offline
                samdol
                wrote on 17 Feb 2017, 21:12 last edited by
                #7

                @VRonin

                Thank you for your detail explain. It sounds clearer now.

                1 Reply Last reply
                0

                3/7

                16 Feb 2017, 10:13

                • Login

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