, DLL "C" (.. ++), .def DLL. .def, , http://www.dependencywalker.com/, ; , . mylibname.def, :
LIBRARY mylibname
EXPORTS
FirstExportedFunctionName
SecondExportedFunctionName
...
LastExpertedFunctionName
dlltool ( MinGW\bin):
dlltool -d mylibname.def -l mylibname.a
mylibname.a, .pro :
win32:LIBS += mylibname.a
, .
, DLL, , Q_DECL_IMPORT.
.h :
extern "C" {
MYLIBAPI(retType) FirstFunctionName(arg list...);
MYLIBAPI(retType) SecondFunctionName(arg list...);
...
MYLIBAPI(retType) LastFunctionName(arg list...);
}
MYLIBAPI
#define MYLIBAPI(retType) Q_DECL_IMPORT retType
MYLIBAPI (retType), , DLL, .
, QT MinGW DLL, VS 2005. VS __stdcall. dlltool .