Visual Studio编译与调用DLL方法

参考自博客:http://www.cnblogs.com/houkai/archive/2013/06/05/3119513.html

用visual studio 2013新建win32 application,选择DLL工程,则新建了DLL工程。在testdll.cpp定义加法、减法等程序,定义头文件testdll.h。编译后可以生成testdll.dll, testdll.lib文件。

用visual studio 2013新建win32 console application,在工程中调用DLL工程里面的函数。在project配置中,配置VC++的include包含testdll.h路径;在library中包含testdll.lib所在路径,将testdll.dll拷贝到本工程的debug目录下。编译运行成功。

原文地址:https://www.cnblogs.com/yuesheng/p/7181318.html