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

QLibrary should support searching for dependencies on the same dir as the library being loaded

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P4: Low
    • None
    • 5.12.1
    • Core: Other
    • None
    • Windows

    • Windows

    Description

      If you want to load a Library on Windows using an absolute Path and the Library has a dependency to a other Library in the same folder, you will get the error: "Cannot load library <Path to the Library that I want to load>: The specified module could not be found." (PS: This error message makes no sense, the file exists and is a Library, but the dependency in is same Folder is not found)
      If you know the Library dependency you can load these and you will not getting this error, but you generally do not know the dependent Libraries.
      I do not know the QLibrary implementation, but I assume you are using the LoadLibrary function of the windows API. This function(https://docs.microsoft.com/de-de/windows/desktop/api/libloaderapi/nf-libloaderapi-loadlibraryexa) has the Parameter LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR, if you are using this parameter in conjunction with LOAD_LIBRARY_DEFAULT_DIRS you can fix this issue. Maybe you will make this behavior optional by adding a Flag to QLibrary::LoadHints.

      Attachments

        For Gerrit Dashboard: QTBUG-74001
        # Subject Branch Project Status CR V

        Activity

          People

            Unassigned Unassigned
            autoantwort autoantwort
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes