手机
当前位置:查字典教程网 >编程开发 >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动态链接库的方法】相关文章:

随机加密程序的实现方法

基于C程序启动代码的深入分析

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

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

DHCP:解析开发板上动态获取ip的2种实现方法详解

C++实现基数排序的方法详解

随机数字去掉重复和排序的方法

判断一个数是不是素数的方法

c语言实现二叉查找树实例方法

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

精品推荐
分类导航