win7, vc6;
新建一个win32 动态链接库工程;名为 dlltest;
空工程 ;
添加Cpp和h文件;
#include "test.h"
int iadd(int x, int y)
{
return x + y;
}
#ifndef LIB_H
#define LIB_H
extern "C" int __declspec(dllexport) iadd(int x, int y);
#endif
然后生成一下工程;
新建一个MFC 单文档工程;
视图类cpp文