如何在交叉编译distutils包时使用mingw32



我正在开发linux-python应用程序,但它们过于打包,无法部署在windows环境中。

我过去在linux开发平台上做任何事情。

然而,目前我需要为win32交叉编译python-chaco库。

我需要给出参数、mingw32编译器和位于~/.wine/drive_c/…中的python dll

我在使用mingw32时遇到了一些问题。在环境中,我已经在葡萄酒驱动器中设置了python win32。

python setup.py  build --compiler=mingw32
running build
running build_py
running egg_info
writing requirements to Chaco.egg-info/requires.txt
writing Chaco.egg-info/PKG-INFO
writing namespace_packages to Chaco.egg-info/namespace_packages.txt
writing top-level names to Chaco.egg-info/top_level.txt
writing dependency_links to Chaco.egg-info/dependency_links.txt
writing manifest file 'Chaco.egg-info/SOURCES.txt'
running build_ext
building 'enthought.chaco.contour.contour' extension
gcc -mno-cygwin -mdll -O -Wall -DNUMPY -I/usr/lib/python2.6/dist-packages/numpy/core/include -I/usr/include/python2.6 -c enthought/chaco/contour/cntr.c -o build/temp.linux-x86_64-2.6/enthought/chaco/contour/cntr.o
cc1: error: unrecognized command line option "-mno-cygwin"
cc1: error: unrecognized command line option "-mdll"
error: command 'gcc' failed with exit status 1

从您的linux cmdline中,要编译的命令类似于:

i586-mingw32msvc-gcc-mdll-O-Wall-DNUMPY-I/home/xxxx/.wine/drive_c/Python26/include-I/home.xxxx/.wine/drive_c/Python26/Lib/site packages/numpy/core/include-c enthaught/caco/control/cntr.c-O build/temp.linux-x86_64-2.6/enthaught/chaco/control/cntr.O

相关内容

  • 没有找到相关文章

最新更新