Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-140752

Multimedia plugins dependencies not found in Windows .dll

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.10.0
    • Build System, Multimedia
    • None
    • Windows

      Scenario:

      QT is used in c:\foo\a.dll that uses Qt Multimedia. c:\bar\test.exe loads the dll. A sample repro skeleton is available at https://github.com/lwahonen/qt-dll

      After running windeployqt c:\foo\a.dll, Qt6Multimedia.dll is deployed to c:\foo and the backend is placed in c:\foo\multimedia\ffmpegmediaplugin.dll

      Unfortunately loading ffmpegmediaplugin.dll fails because it's dependent on Qt6Multimedia.dll which is not found in neither the executable directory ( c:\bar ) nor in the same directory as backend itself ( c:\foo\multimedia )

      This can be worked around by adding c:\foo to dll search path with SetDllDirectory:

      QString currentDir = QString::fromStdWString(getCurrentDllFolder()); <- returns c:\foo
      app.addLibraryPath(currentDir);
      SetDllDirectory(getCurrentDllFolder().c_str());
       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qtbuildsystem Qt Build System Team
            makkonen Lauri Ahonen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes