【问题标题】:How to specify static python for boost.python?如何为 boost.python 指定静态 python?
【发布时间】:2023-03-13 03:45:01
【问题描述】:

我想将 python 链接到静态提升,以便独立于其他 DLL 库在一个进程中为每个 DLL 库使用 python 和 boost.python。 标准配置 API 没有执行此类操作的任何选项。

有没有办法做到这一点?

【问题讨论】:

    标签: python c++ boost boost-python linkage


    【解决方案1】:

    如果我们使用,这种可能性存在于 unix 上

    ./configure --disable-shared
    

    用于 python 构建。结果 python 被构建为静态库,boost python 链接这个静态库。 在 Windows 系统上,需要下载 python 源并手动将项目更改为静态库构建。然后为 boost 源指定此静态库的库路径。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-09-07
      • 1970-01-01
      • 2012-02-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多