[Distutils] SWIG+distutils+Windows???

Michel Van den Bergh michel.vandenbergh@luc.ac.be
Wed Jan 3 17:09:02 2001

Norman Vine wrote:
> Michel Van den Bergh writes:
> >>>
> >> Norman
> >Thanks for the suggestion, but I am just using the vanilla ActiveState
> >Python2.0.
> >I tried to add USE_DLL_IMPORT to the gcc flags anyway but it
> >didn't make
> >any difference. The same symbols remain undefined. I really don't
> >understand what goes on here. These symbols are referenced in Python.h
> >and descendants as externals but they don't seem to be in python20.lib
> >(I checked with nm).
> >I also tried SWIG on Windows but that didn't help either (I
> >didn't think it would).
> I do not think you will have much luck compiling against a non-cygwin
> python with Cygwin unless you are using the --no-cygwin switch
> These undefined symbols are coming from PY_SRC / include / object.h
> Python compiles fine as a dll with this patch
> http://sourceforge.net/patch/?func=detailpatch&patch_id=102409&group_id=5470
> I haven't tried to get this working with Distutils
> Also when using the Cygwin compiler and embedding python
> I had to add the -DUSE_DLL_IMPORT flag when using a cygwin
> compiled python in dll form.  I did not need this flag with a static
> library.  Again this is all using the above patch and a recent Cygwin
> Sorry I can not be of more help
> Norman
Thanks anyway!