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 小高 閱讀(506) 評論(0)  編輯  收藏 所屬分類: C

          導航

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

          統計

          常用鏈接

          留言簿(3)

          隨筆分類(352)

          收藏夾(19)

          關注的blog

          手冊

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 宁国市| 利川市| 友谊县| 漠河县| 遂昌县| 遵义市| 兰坪| 彩票| 成安县| 上杭县| 苏州市| 文水县| 缙云县| 乌审旗| 灵台县| 城固县| 辰溪县| 鄂托克旗| 太仆寺旗| 江达县| 江西省| 玉田县| 大关县| 修武县| 高雄县| 禄丰县| 饶河县| 宁陕县| 双鸭山市| 伊吾县| 闽侯县| 沈丘县| 朝阳区| 吴江市| 仪陇县| 乌苏市| 凤山市| 额尔古纳市| 双柏县| 綦江县| 灌阳县|