Static build Qt application with dynamic link with 3rd party library.
-
wrote on 15 Feb 2017, 19:31 last edited by samdol
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? -
wrote on 15 Feb 2017, 19:38 last edited by
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
-
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
-
wrote on 16 Feb 2017, 10:46 last edited by VRonin
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
-
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
-
wrote on 17 Feb 2017, 07:56 last edited by
- I think it's ok
- No
- No
3/7