Python 2.5 extensions are compiled on Windows with vctoolkit2003 by
default. It is the same compiler used on Python 2.5. When I compile
with MinGW I get these warnings:
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
which appear to be related to the libraries portmidi.lib and
porttime.lib. Maybe the VC linker can ignore -defaultlib directives in
a library. I find there is a /NODEFAULTLIB:library linker option.
Maybe add something like the following to setup.py after libraries =
[....] for win32:
extra_link_args=["NODEFAULTLIB:LIBCMT",
"NODEFAULTLIB:OLDNAMES", "NODEFAULTLIB:uuid.lib"]
Or try running vcvars32.bat (is there one for the 2003 toolkit) before
executing setup.py.
If you wish you may try the pypm.pyd I compiled MinGW. It links to
msvcr71.dll, which is the big issue with Python 2.5, and works with my
small test program.
Lenard
machinimist@xxxxxxxxx wrote:
that fixed the pyrex problem. i have the .c file now but there is
another problem i ran into.
i tried to use code::blocks and the vctoolkit2003 to compile the
extension. i get this error message: fatal error LNK1104: cannot open
file 'LIBCMTD.LIB'
maybe you can give me another tip?
what compiler did python 2.5 for windows get compiled with? i read
somewhere that it can get messy if you don't use the same compiler
for extensions.