EXPORTS
; Explicit exports can go here
8. Build TestDll。得到TestDll.dll和TestDll.lib位于..\..\debug目录下。

二、

动态链接库的调用示例
1. 创建MFC Application 中的Dialog Based应用程序,得到TestDllApply工程。
2. 在TestDllApply工程中的stdafx.h中添加一项:
#include "MyDllH.h";
3. 添加对话框中“确定”按钮的消息响应函数,如下:
void CMyDllApllyDlg::OnBnClickedOk()
{
// TODO: Add your control notification handler code here
CMyDll myDll;
int i = myDll.Max(2,9);
OnOK();
}
4. 设置TestDllApply工程的Property,如下:
General->OutPut Directory ..\..\Debug
C++->General->Additional Include Directories TestDll工程中MyDll.cpp所在目录路径
Linker->General->Additional Library Directories TestDll工程中Debug文件夹的目录路径
Linker->Input->Additional Dependencies TestDll.lib
5. 编译、链接并运行TestDllApply工程,断点跟踪至int i = myDll.Max(2,9);语句,可以看到i的值是9。
