[Distutils] SWIG+distutils+Windows???

John J. Lee phrxy@csv.warwick.ac.uk
Thu Jan 4 13:53:01 2001

First: Michel, can you please NOT post private emails such as the one I
sent you to public newsgroups / lists.  In this case I merely wanted to
avoid filling up this list with my answer which I pretty sure wasn't quite
correct in some way or other (I should have said libpython20.a rather than
.so in fact).  But generally, posting private emails to newsgroups or
mailing lists is bad manners because there is usually a reason why the
person did not publicly post it.

I'm still a bit vague about all this machinery, but anyway:

On Thu, 4 Jan 2001, Michel Van den Bergh wrote:

> Ok, Thanks for everybody's help and especially for the tips contained in
> the  post below. I managed to make my extension! In the end it was easy!
> I did the following.
> (3) I used
>   python setup.py build_ext -cmingw32
> Before I had used -ccygwin. This compiled but produced an unloadable
> library. Of course you need to download  the mingw compiler. I used the
> crtdll version. Afterwards I read that it had been better to use the
> msvcrt version.

You don't need to download mingw, cygwin will compile it without linking
to cygwin1.dll -- Distutils tells cygwin to do this (presumably) by
passing the -mno-cygwin option.

> (4) The command in (3) gave some errors since mingw32 does not seem to
> support all posix functions. I fixed this and then everything compiled
> and linked smoothly.

If you want posix things, use -c cygwin and make sure cygwin1.dll is
available (freely available, of course).