Looking for dlls to be linked dynamically under a specific folder?
-
wrote on 21 Jun 2013, 11:27 last edited by
Hi all,
I have an application which requires 3 dlls. For a certain reason, I need to put the dlls under a specific folder. Could you please tell me if there is an easy code to add .pro file or any other part so that the executable will look for the dlls to link dynamically under the specific folder?
Thanks.
-
@
LIBS += -L/path/to/your/libs -llib1name -lib2name -lib3name
@ -
wrote on 21 Jun 2013, 11:47 last edited by
[quote author="sierdzio" date="1371814853"]@
LIBS += -L/path/to/your/libs -llib1name -lib2name -lib3name
@[/quote]But this is not for runtime right? I have this line in my pro file but it is pointing to the folder where I put the dlls for build.
-
No, of course, it is for linking, just as you have asked.
How the OS provides shared libraries is outside of Qt's scope. On Windows, the DLL needs to either be installed in system32, or reside in current directory.
Unix OSes are much more flexible in that respect.
-
wrote on 21 Jun 2013, 12:32 last edited by
So there is no way to say the application that on runtime if you want to link a dll, go and find it under ... folder.
-
Nope.
Read through "this":http://stackoverflow.com/questions/107888/is-there-a-windows-msvc-equivalent-to-the-rpath-linker-flag, though, if you are interested in workarounds.
3/6