[Pyrex] Pyrex on Win7-64
Lynn Oliver
raycores at gmail.com
Mon Apr 9 01:01:59 CEST 2012
I'm using Pyrex to build PyPortMidi. I was able to get it to work on OS X 10.7.3; on win32 (Windows XP) I didn't manage to get Pyrex to work, but I was able to get the PyPortMidi library built by copying in the output (pypm.c) from OS X. That didn't work on win64 (Windows 7).
Working on win64, I tried two different ways to install Pyrex-0.9.9:
Downloaded Pyrex-0.9.9.win32.exe and ran it.
Downloaded Pyrex-0.9.9.zip, unpacked it and ran "python setup.py install"
With either installation, when I try to build PyPortMidi I get the same error:
pyrexc pypm.pyx --> pypm.c
C:\Users\Lynn Oliver\Desktop\pyPortMidi\pypm.pyx:357:21: Type 'PmError' not acceptable as a boolean
building 'pypm' extension
C:\Python27\Scripts\gcc.exe -mno-cygwin -mdll -O -Wall -DMS_WIN64 -IC:\Python27\include -IC:\Python27\PC -c pypm.c -o bu
ild\temp.win-amd64-2.7\Release\pypm.o
pypm.c:1:2: error: #error Do not use this file, it is the result of a failed Pyrex compilation.
error: command 'gcc' failed with exit status 1
This error didn't occur on OS X. I'm not a C programmer so it's not clear to me what caused the error; here is the declaration for PmError:
ctypedef enum PmError:
pmNoError = 0,
pmHostError = -10000,
pmInvalidDeviceId, #/* out of range or output device when input is requested or vice versa */
pmInsufficientMemory,
pmBufferTooSmall,
pmBufferOverflow,
pmBadPtr,
pmBadData, #/* illegal midi data, e.g. missing EOX */
pmInternalError,
pmBufferMaxSize, #/* buffer is already as large as it can be */
And here is the section of code where the error was flagged, I think...:
cdef PmEvent buffer[1]
cdef PmError err
Pm_SetFilter(self.midi, filters)
if err < 0: raise Exception, Pm_GetErrorText(err)
357 while(Pm_Poll(self.midi)):
err = Pm_Read(self.midi,buffer,1)
if err < 0: raise Exception, Pm_GetErrorText(err)
The error was generated at: ExprNodes.py:590
Here are some of the local variables at the point the error was posted:
self.pos ('c:\\Users\\Lynn Oliver\\Desktop\\pyPortMidi\\pypm.pyx', 357, 21)
type.__doc__ None
type.__module__ 'Pyrex.Compiler.PyrexTypes'
type.cname 'PmError'
type.from_py_function 'PyInt_AsLong'
type.is_enum 1
type.name 'PmError'
type.rank -1
type.signed 1
type.to_py_function 'PyInt_FromLong'
type.typedef_flagis 1
type.values []
self.pos ('c:\\Users\\Lynn Oliver\\Desktop\\pyPortMidi\\pypm.pyx', 357, 21)
type.is_int 0
type.is_error 0
Can anyone suggest what I need to do to get this working?
Thanks,
LMO
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.copyleft.no/pipermail/pyrex/attachments/20120408/4a98ea68/attachment.html>
More information about the Pyrex
mailing list