c++ - Linux下使用distutils交叉编译python扩展

标签 c++ python swig distutils mingw32

有没有办法在Linux下同时编译Windows和Linux版本的Python/distutils/SWIG/C++扩展?据我了解,问题至少在于获取 python-dev 的 Windows 版本。

谢谢。

最佳答案

你可以通过两种方式做到这一点:

  1. Install MingW on your linux system, and cross-compile the extension using it

  2. Compile it in a Windows Virtual Machine (eg. Windows7 on VirtualBox)

我更喜欢第二个选项,因为它提供了测试程序是否正常工作的机会

关于c++ - Linux下使用distutils交叉编译python扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3198177/

相关文章:

c++ - 在 C 中跟踪 Lua 表

c++ - 使用 SWIG 在 Lua 中实现和继承 C++ 类

c# - 具有大量客户端的套接字编程中的客户端到客户端通信

python - Celery Python 中的异步子任务

python - 遍历 not None 和 not empty 目录

python - 使用 python Discord bot 播放 Youtube 音频

python - 使用 SWIG 为 python 包装 C++ 代码。无法使用 cout 命令

c++ - 转发模板自动

c++ - 赋值期间双重值变化

C++函数调用作为参数,不起作用