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. Are there any problems that could arise from a Qt application using a library that is statically linked to Qt?
Forum Updated to NodeBB v4.3 + New Features

Are there any problems that could arise from a Qt application using a library that is statically linked to Qt?

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 145 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.
  • Guy GizmoG Offline
    Guy GizmoG Offline
    Guy Gizmo
    wrote on last edited by
    #1

    I'm considering a library that is currently built with Qt and dynamically linked to Qt's libraries. Because it depends Qt and uses dynamic linking, the library can only be used in Qt applications that are themselves linked with a compatible version of Qt. (Do correct me if I'm wrong.)

    However, I'd like that library to be freed of that restriction. Aside from removing its dependency on Qt altogether, I'm wondering if statically linking to Qt would work. Assuming that it's compiled properly so that none of Qt's symbols are visible to any program that loads the library, would that work? Or are there things Qt is doing behind the scenes or at runtime that would cause two different Qt versions running within the same application to come into conflict?

    In particular I'm wondering if the library would work if it were statically linked to Qt 6, and then used in an app linking to Qt 5.

    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