JUST DO IT ~

我只想当个程序员

c++ dll 接口需要加声明


运行时问题 : 
虚接口抽象类 遇到
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.  
This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.

编译问题:
具体dll函数遇到 
DLL 找不到函数编译连接时候。

实际是 DLL    _stdcall。
      vc    _cdecl 。


#ifndef BUDLL
#define BUPUB_API 
#else
#ifdef BUPUB_EXPORTS
#define BUPUB_API __declspec(dllexport)
#else
#ifdef _MSC_VER
#define BUPUB_API __declspec(dllimport)
#else
#define BUPUB_API 
#endif
#endif
#endif

class BUPUB_API IMDListener{

#undef BUPUB_API


http://stackoverflow.com/questions/142644/weird-msc-8-0-error-the-value-of-esp-was-not-properly-saved-across-a-function

posted on 2016-12-15 09:34 小高 阅读(473) 评论(0)  编辑  收藏 所属分类: C


只有注册用户登录后才能发表评论。


网站导航:
 

导航

<2016年12月>
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

统计

常用链接

留言簿(3)

随笔分类(352)

收藏夹(19)

关注的blog

手册

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜