手机
当前位置:查字典教程网 >编程开发 >C语言 >VC创建DLL动态链接库的方法
VC创建DLL动态链接库的方法
摘要:本文实例讲述了VC创建DLL动态链接库的方法。分享给大家供大家参考。具体实现方法如下:头文件中声明t.h#ifdefDLL_API#else...

本文实例讲述了VC创建DLL动态链接库的方法。分享给大家供大家参考。具体实现方法如下:

头文件中声明 t.h

#ifdef DLL_API #else #define DLL_API extern "C" _declspec(dllimport) #endif DLL_API int a(int cnt); DLL_API int b(int cnt);

.h文件引入

#define DLL_API extern "C" _declspec(dllexport) #include "t.h"

cpp文件中写函数体

#define DLL_API extern "C" _declspec(dllexport) #include "t.h" int a(int cnt) { return cnt+1; } int b(int cnt) { return cnt+10; }

希望本文所述对大家的VC程序设计有所帮助。

【VC创建DLL动态链接库的方法】相关文章:

排列组合总结:将结果进行输出的实现方法

VC6.0如何创建以及调用动态链接库实例详解

冒泡排序的三种实现方法

解决C++中事件不响应的方法详解

C++读写Excel的实现方法详解

用C++实现单向循环链表的解决方法

VC++中的字体设置方法详解

C++可变参数的实现方法

C++实现正态随机分布的方法

C语言实现静态链表的方法

精品推荐
分类导航