Cross-compiling python extensions under Linux using distutils
Is there any way to compile bot开发者_高级运维h Windows and Linux versions of Python/distutils/SWIG/C++ extensions under Linux? As far as I understand the problem is at least in obtaining windows version of python-dev.
Thank you.
You could do it in two ways:
Install MingW on your linux system, and cross-compile the extension using it
Compile it in a Windows Virtual Machine (eg. Windows7 on VirtualBox)
I prefer the second option as it gives the opportunity to test that your program is working
精彩评论