Details
-
Suggestion
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.12.1
-
None
-
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
Gerrit Reviews
For Gerrit Dashboard: QTBUG-74001 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
260076,4 | QLibrary: Add flag to search only the default dirs on Windows | dev | qt/qtbase | Status: ABANDONED | -1 | 0 |