Are there any problems that could arise from a Qt application using a library that is statically linked to Qt?
-
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.