在vs2010 下打包dll 的问题
在ZL的文件夹下在头文件的函数跟cpp 下面都加上 _stdcall
比如我们的函数就是
bool _stdcall image_process(unsigned char *InputImg, int inWidth, int inHeight, unsigned char *outputImg)
在cpp 下相应的文件下 也加上 _stdcall 即是 bool _stdcall image_process(unsigned char *InputImg, int inWidth, int inHeight, unsigned char *outputImg)
下面是创建一个 def 文件
在记事本里面写:
LIBRARY "cpp 函数的文件名"
EXPORTS
调用函数 @1
此处的cpp 文件名为 stalization
调用函数为image_process 所以就是
LIBRARY "stalization"
EXPORTS
image_process @1
保存为 stalization.def
在VS2010 的文件夹下面 的属性
工程 > 属性中的链接器,然后找到"输入"这一项. 在 "模块定义文件" 中输入 stalization.def
哪里有讲的不清楚的地方 请参考:
http://www.cnblogs.com/chengxin1982/archive/2010/01/06/1640052.html
本文详细介绍了如何在Visual Studio 2010环境下进行DLL文件的打包过程,包括如何正确地使用_stdcall修饰符声明和定义函数,以及如何创建并配置DEF文件来导出所需的函数。
3035

被折叠的 条评论
为什么被折叠?



