I open .dll with the help of QLibrary (I check, it opens successfully). Then, before adding this .dll to the header
#ifdef Q_WS_WIN #define MY_EXPORT __declspec(dllexport) #else #define MY_EXPORT #endif (as stated in the manual), and, adding in the header, to the functions that I want to call
extern "C" MY_EXPORT __declspec(dllexport) For example:
I try, in fact, to call them this way:
Geocom_orig=new QLibrary("GeoComS2K.dll"); Geocom_orig->load(); qDebug()<<Geocom_orig->isLoaded(); typedef GRC_TYPE (*MyComInit)(); MyComInit ComInit=(MyComInit) Geocom_orig->resolve("COM_Init"); qDebug()<<Geocom_orig->errorString(); if(ComInit) qDebug()<<"OK"; int returnedCode=ComInit(); errorString () displays the error:
What could be the problem? It seems that everything is done correctly ... The only thing that seems to me strange is that it displays "COM_Init \" as an undefined symbol.
UPD: I apologize, did not translate the console encoding:
Actually, I do not really understand, is he really looking for exactly "COM_Init \"?


