Problems w/mingw32

Mumit Khan khan at janus.xraylith.wisc.edu
Fri Nov 10 15:17:17 EST 2000


In article <8uheh9$c7u$1 at nnrp1.deja.com>,  <kdahlhaus at yahoo.com> wrote:
>Hello,
>
>After creating an import lib for Python 16 via Robert Kern's notes, I'm
>still having trouble compiling an extension.  It appears that the
>mingw32 libs are looking to link to a WinMain.  Can anyone shed
>somelight on this? Thanks!
>
>Here's the output:
>
>gcc -ID:\\Python16\\include  -c spammodule.c -o spammodule.o
>dllwrap  --dllname spam.pyd --driver-name gcc --def spam.def -o
>spam.pyd \
>        spammodule.o -s --entry _DllMain at 12 --target=i386-ming32 \
                                             ^^^^^^^^^^^^^^^^^^^^
					     --target=i386-mingw32

If you're not cross-compiling, and you're using the default entry
point (DllMain at 12) etc, you can shorted the whole thing to:

  dllwrap  --dllname spam.pyd --def spam.def -o spam.pyd \
    spammodule.o -s -LD:/Pylibs/mingtools  -lpython16

The --target=i386-mingw32 is there to help when you're building on
say a Linux box targetting a x86-win32 box. 

Regards,
Mumit




More information about the Python-list mailing list