c++ - 在 C++ 中嵌入 python,我需要安装 python

标签 c++ python static-linking python-embedding

当使用

在 C++ 应用程序中嵌入 Python 时
#include "python2.6/Python.h"

和链接-lpython2.6

目标计算机(运行最终编译程序的计算机)是否需要安装 python 才能使用我的应用程序?

谢谢

最佳答案

这取决于。您是静态链接库还是动态链接库? 如果您动态链接,那么是的,您的目标计算机需要安装 Python。

关于c++ - 在 C++ 中嵌入 python,我需要安装 python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15926601/

相关文章:

c++ - 向后读取文件?

c++ - 正确使用 Boost::ref ..?

c - Visual Studio 不一致地生成 .lib

c++ - 如何设置 CMAKE 静态链接(对 `dlopen' 的 undefined reference )?

c - 构建依赖于另一个静态库的静态库

c++ - 重载 << 运算符时访问私有(private)类成员的问题

c++ - 为什么使用 thread_local 会崩溃?

python - 如何在初始化变量的结构之间随机选择?

python - Pandas .at 与 .loc

python - 如何找到字符串的一部分?