Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Whether Qt - Shared C++ Library - can be used by other non Qt applications?



  • I want to create a c++ shared library (.so), which will be used by multiple applications(both qt and non qt ).
    But if we create the shared c++ library in Qt, will it possible for other non-qt applications to use the APIs of this library. Will there be any dependency ?


  • Lifetime Qt Champion

    Hi,

    Dependency on the Qt module you are using and depending on what you use from Qt, there's the mandatory Q/Core/Gui/Application object.



  • If you handle anything Qt based in your library and your lib can link the the required Qt modules you should be fine. I have done it on windows a few times for LabVIEW to call it and some of the C# guys as well. If I needed a qt event loop i start it with my library and they have to manage properly closing it when they are done.

    -Shawn



  • @MrShawn Ok thanks for your reply !
    My Qt Library uses some of the qt modules like Qt Core, QtNetwork etc. What can be done to resolve the dependency with these Qt modules.



  • @SGaist Ok thanks for your reply !
    My Qt Library uses some of the qt modules like Qt Core, QtNetwork etc. What can be done to resolve the dependency with these Qt modules. lib_error.png image url))


  • Lifetime Qt Champion

    Unless you put the Qt parts behind a private implementation your users will have to link against Qt as well as your library.


Log in to reply