c++ dll 接口需要加聲明
運(yùn)行時(shí)問題 :
虛接口抽象類 遇到
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函數(shù)遇到
DLL 找不到函數(shù)編譯連接時(shí)候。
實(shí)際是 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 小高 閱讀(506) 評(píng)論(0) 編輯 收藏 所屬分類: C