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

Creating a dynamic library which is linked to Qt5Widgets.dll statically.



  • Hi,

    I compiled Qt5.6 statically to create a standalone application. I could dynamically load ffmpeg for my app.
    I would like to use QtAV which is wrapper for ffmpeg. I could statically link QtAV and dynamically link ffmpeg. In other words,
    QtAV is merged to my statically built app while ffmpeg.dlls are required to run the app.
    But I also want to link QtAV dynamically. To do that, I have created dynamic QtAV library.
    Eventually, statically built app.exe + QtAV.dlls + ffmpeg.dlls is my goal.
    When I run my app, it not only requires QtAV.dlls and ffmpeg.dlls, but also Qt5Core.dll, Qt5Gui.dll, Qt5Widgets.dll....
    I think it is becuase QtAV requires those Qt5--.dlls. Is there any way to create QtAV.dlls which is statically linked to Qt5--.dlls
    so that my application does not require Qt5--.dlls?
    Thank you.

    Samdol.


  • Qt Champions 2019

    @samdol said in Creating a dynamic library which is linked to Qt5Widgets.dll statically.:

    so that my application does not require Qt5--.dlls?

    No, and I'm pretty sure it will crash sooner or later when you use the arrangement above.


Log in to reply