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

          導航

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

          統計

          常用鏈接

          留言簿(3)

          隨筆分類(352)

          收藏夾(19)

          關注的blog

          手冊

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 朔州市| 徐闻县| 克山县| 罗甸县| 同德县| 玛多县| 哈巴河县| 湘阴县| 荣昌县| 泰州市| 甘肃省| 定兴县| 正镶白旗| 洪雅县| 博湖县| 莆田市| 喀喇沁旗| 鄂伦春自治旗| 茂名市| 汤阴县| 渑池县| 金溪县| 双鸭山市| 沁水县| 阳西县| 彰武县| 鲁甸县| 西充县| 额济纳旗| 宜兰市| 红原县| 昌吉市| 通州市| 巫溪县| 永宁县| 徐汇区| 天长市| 龙岩市| 北安市| 壤塘县| 周至县|