发新话题
打印

dll的问题,高手帮我解决啊

dll的问题,高手帮我解决啊

我在vc环境中生成dll时,新建了个Win32 Dynamic-Link Library工程,其中文件代码如下
//----myfunction.h文件-----
#ifndef myfunction_h
#define myfunction_h
extern "C" int __declspec(dllexport) __stdcall MyFunction(int a,int b);
#endif

//----myfunction.cpp文件-----
#include "myfunction.h"
#include"stdio.h"
#include"windows.h"

int  _stdcall myfunction(int a,int b)
{
return a+b;
}

//----myfunction.def文件-----

LIBRARY myfunction
EXPORTS
myfunction @ 1

生成了myfunction.dll后,用vc的depends工具查看,发现没有导出函数
这是错在那里啊???高手帮我看下拉

TOP

发新话题