Not able to load dll
-
Hi,
I am not able to load dll. "bool okLoad = mylib.load();" is returning false.
I have tried following, but none of them are working:
1.) QLibrary mylib("abc.dll");
bool okLoad = mylib.load();2.) QLibrary mylib("C:/Simulator/Package/trunk/Simu/abc.dll");
bool okLoad = mylib.load();3.) I have added "LIBS += abc.dll " in .pro file too
I don't know I am not able to load dll.
Thanks in advance
-
"LIBS += abc.dll" is nonsense, remove it.
And please provide more info:
What is this DLL for?
Does it contain C-exported methods? If not is the compiler version the same?
What does QLibrary::errorString() return after the you have called load()? -
QLibrary::errorString() returns :
"Cannot load library abc.dll: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."I can see that corresponding header file have C-exported methods.
-
are all symbols exported by the DLL C-exported? As is said if not all symbols are C-exported the compiler (and probably some specific settings) need to match in order to successful load the library!
Where did you get the DLL from? -
Danke raven-work !
Your questions solved my half of the problem. :)