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

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

Java3D实例之创建空间几何模型的实现方法

链接库动态链接库详细介绍

VC6.0常见链接错误与解决方法

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

将正小数转化为2-9进制小数的实现方法

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

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

GCC 编译使用动态链接库和静态链接库的方法

c语言连接mysql数据库的实现方法

精品推荐
分类导航