How to include one .dll file to QT working project.
-
Hi we are trying to add one external dll file to our current working qt project but it is throwing error.
DLL -> McxApi.dllWe tried to attach the dll file to the .pro file using below method
LIBS += <psth>/McxApi.dll
Here it was able to add but while accessing the library it was throwing error.Can you let us know how to solve this issue so that we will helpfull.
-
Hi we are trying to add one external dll file to our current working qt project but it is throwing error.
DLL -> McxApi.dllWe tried to attach the dll file to the .pro file using below method
LIBS += <psth>/McxApi.dll
Here it was able to add but while accessing the library it was throwing error.Can you let us know how to solve this issue so that we will helpfull.
@Jigyansu
If you want to link with a DLL you need a library.lib
file (MSVC) or a.a
file (MinGW, if it's C++, or.lib
if it's C only) to pass to the linker. Not the DLL. That is required to be found at runtime.If you only want to load the DLL dynamically at runtime, that does not require any library at link time. But it is much harder to call functions in a dynamically-loaded DLL than in one linked with.