JUST DO IT ~

          我只想當(dāng)個(gè)程序員

          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

          導(dǎo)航

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

          統(tǒng)計(jì)

          常用鏈接

          留言簿(3)

          隨筆分類(352)

          收藏夾(19)

          關(guān)注的blog

          手冊(cè)

          搜索

          積分與排名

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 巧家县| 遵义市| 淮滨县| 凉城县| 周宁县| 庆云县| 兴安盟| 濉溪县| 樟树市| 柏乡县| 石城县| 确山县| 五华县| 邵阳市| 定远县| 兴城市| 襄汾县| 靖远县| 夏河县| 东方市| 莱州市| 沽源县| 民权县| 修武县| 富宁县| 错那县| 云南省| 百色市| 罗田县| 鄂托克旗| 丰顺县| 化隆| 额济纳旗| 遵义县| 嘉定区| 宁津县| 竹山县| 封丘县| 大洼县| 南平市| 卫辉市|