【问题标题】:Swig C++ python wrapper files explanation?Swig C++ python 包装文件解释?
【发布时间】:2017-06-13 21:05:29
【问题描述】:

我已经用 swig 和 VS2017 将一个 C++ 应用程序打包到 python 中,它可以工作。

如果我想在其他地方使用模块,我不确定需要哪些输出文件。我将example.py_example.pyd 复制到另一个文件夹中,它在那里工作,但我不确定它是否是一般情况。

下面是输出文件列表?有谁知道它们各自的用途吗?

06/13/2017  13:46             3,617 example.log
06/13/2017  13:45             5,727 example.py
06/13/2017  13:46             8,473 example.pyc
06/13/2017  13:46    <DIR>          example.tlog
06/13/2017  13:46           423,546 example_wrap.obj
06/13/2017  13:46         2,158,592 vc141.pdb
06/13/2017  13:45             2,128 _example.Build.CppClean.log
06/13/2017  13:46               750 _example.exp
06/13/2017  13:46             1,748 _example.lib
06/13/2017  13:46         4,280,320 _example.pdb
06/13/2017  13:46            53,248 _example.pyd

【问题讨论】:

    标签: python c++ wrapper swig


    【解决方案1】:

    大多数是您不需要的中间文件。 .py.pyd 是您需要的文件,加上 _example.pdb 如果您使用符号调试器调试 _example.pyd(实际上是重命名的 DLL)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-10
      • 2021-08-29
      • 2016-10-13
      相关资源
      最近更新 更多