下面注释掉的两行都编译通不过。 VS2017.
#include <QCoreApplication>
#include <QLibrary>
#include <QDebug>
typedef short ( *FUNCTION) (int, int);
//typedef __stdcall short ( *FUNCTION) (int, int);
//typedef __cdecl short ( *FUNCTION) (int, int);
FUNCTION add;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QLibrary myLib("mydll");
myLib.load();
qDebug() << myLib.isLoaded();
add = (FUNCTION) myLib.resolve("Add");
return a.exec();
}
【 在 hgoldfish 的大作中提到: 】
: 有完整的测试用例吗?
:
--
FROM 120.244.156.*