Suppose I have two libraries, A.dll
and B.dll
. The library A
depends on B
. I want to load A
into my project.
My project is in C:/Project
. If I keep both A.dll
and B.dll
in C:/Project
, I can load A
with:
QLibrary lib("A");
lib.load();
This works fine. load()
will return false if B.dll
isn't in C:/Project
, though.
The problem is I want to keep both A.dll
and B.dll
in C:/Project/lib
. But when I move both libs to that location and try to load:
QLibrary lib("C:/Project/lib/A");
lib.load();
It fails. But this works if I keep A.dll
in C:/Project/lib
and B.dll
in C:/Project
.
How can I keep both libs in C:/Project/lib
and have A.dll
load successfully?
Edit: the error message I get is "Cannot load library C:/Project/lib/A . The specified module could not be found."