一般c++项目封装成动态链接库dll

一般c++项目封装成动态链接库dll

更改函数声明

在函数声明前加上
extern "C" _declspec(dllexport)
比如:
extern "C" _declspec(dllexport) int  testIntf(int num1, int num2);

更改程序输出名

在vc6.0中:
project->setting->link->out file name:将文件后缀 .exe 改成 .dll
最终将在Debug文件中找到生成的 .dll 文件和 .lib 文件

猜你喜欢

转载自blog.csdn.net/aboklh/article/details/85282242