#include "mydll.h"
MyDll::MyDll()
{
}
int MyDll::sum(int a, int b)
{
return a + b;
}
int MyDll::sub(int a, int b)
{
return a - b;
}
///注意
extern "C" MYDLL_EXPORT IConnect* Create()
{
return new MyDll();
}
///将MyDll的lib和dll文件加载库后 调用
IConnect* connect = Create();
cout<<connect->sum(3, 5)<<endl;
可以继续封装