By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,222 Members | 1,436 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,222 IT Pros & Developers. It's quick & easy.

Pyrex problem - Py_NoneStruct

P: n/a
I'm getting a clean generate, compile and link from my .pyx script, but when
I attempt to run the resultant .exe, I get:

"The procedure entry point Py_NoneStruct could not be located in the
dynamic link library python23.dll"

Can anybody provide me with a clue here? I've already cut down my script to
remove all references to None, Py_None, NULLs, etc, but to no avail. fwiw
I'm using latest Pyrex and ActiveState build 232.

many tias,

gary

Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Gary Stephenson" <ga***@ihug.com.au> writes:
I'm getting a clean generate, compile and link from my .pyx script, but when
I attempt to run the resultant .exe, I get:
Hmm, what resultant .exe? Are you using py2exe or similar, or is
there a feature of Pyrex I haven't noticed? I've always ended up with
a .so / .DLL.

"The procedure entry point Py_NoneStruct could not be located in the
dynamic link library python23.dll"

[...]

Had this before, but forget what the problem is.

Try posting some Pyrex code (the pyrex list is probably a better place
than here).
John
Jul 18 '05 #2

P: n/a
Hi John,

"John J. Lee" <jj*@pobox.com> wrote in message
news:87************@pobox.com...
"Gary Stephenson" <ga***@ihug.com.au> writes:
I'm getting a clean generate, compile and link from my .pyx script, but when I attempt to run the resultant .exe, I get:
Hmm, what resultant .exe? Are you using py2exe or similar, or is
there a feature of Pyrex I haven't noticed? I've always ended up with
a .so / .DLL.


Err, yes ... I have used Pyrex before (successfully) using distutils to
produce a .DLL. In this case, however, I am effectively attempting to embed
Python within another language (Xbase++), so I am compiling the pyrex
generated .c file using MSVC6 into an ..obj file and linking that into my
Xbase++ app. It would appear that my problems arise from incorrect switches
to cl.exe. fwiw, the switches I"m using are: /c /Zl /Tc

I've searched high and low for some guidance on what the correct switches
might be, but alas to no avail thus far. :-(
"The procedure entry point Py_NoneStruct could not be located in the
dynamic link library python23.dll" [...]

Had this before, but forget what the problem is.


Try, try .... please... <g>
Try posting some Pyrex code (the pyrex list is probably a better place
than here).


I have attempted to post this message along with the .pyx file to the pyrex
list, but it would appear there is something wrong with my subscription as
I have received neither my own message not anybody else's since subscribing
:-(

cheers,

gary

The following is a somewhat cut down version of my .pyx file whichl produces
the error:

from scanners import xppScanner

ctypedef unsigned long ULONG
ctypedef void * XppParamList
ctypedef long BOOL
ctypedef void * ContainerHandle

cdef extern from "windows.h" :
pass

cdef extern from "xppdef.h" :
pass

cdef extern from "xppcon.h" :
ULONG _conGetNL( void * hNumeric, long *nlValue)
void * _conParam(void * pList, unsigned long paramIndex, long
*bReference)
void * _conPutC( void * hDest, char *string)
void * _conPut( void * hDest, void * hSrc)
BOOL _retnl(XppParamList pList, long numInt)
BOOL _ret(XppParamList pList)
unsigned long _conRLockC( void * hString, char **ppString, unsigned
long *ulSize)
unsigned long _conUnlockC( void * hString)

cdef public BOOL C_OX_PYINITIALIZE( XppParamList pList ) :
Py_Initialize()
_ret( pList )

cdef public BOOL C_OX_PYFINALIZE( XppParamList pList ) :
Py_Finalize()
_ret( pList )

cdef public BOOL C_OX_XPPSCANNER( XppParamList pList ) :
cdef ContainerHandle ch1
cdef ULONG nRslt,nLen
cdef BOOL pRef
cdef object oScan,cStr

ch1 = _conParam( pList, 1, &pRef )
cStr = "test.prg"
oScan = xppScanner( cStr ).gen()
nRslt = <ULONG>oScan
_retnl( pList, nRslt )

cdef public BOOL C_OX_XPPSCANNER_NEXTTOKEN( XppParamList pList ) :
cdef ContainerHandle ch1,ch2,ch3
cdef ULONG nLen
cdef BOOL pRef

ch1 = _conParam( pList, 1, &pRef )
ch2 = _conParam( pList, 2, &pRef )
ch3 = _conParam( pList, 3, &pRef )
_conGetNL( ch1, <long*>&nLen )
oScan = <object>nLen
cTyp,cVal = oScan.next()
_conPutC( ch2,cTyp )
_conPutC( ch3,cVal )
_ret( pList )
Jul 18 '05 #3

P: n/a
"Gary Stephenson" <ga***@ihug.com.au> writes:
[...]
Try posting some Pyrex code (the pyrex list is probably a better place
than here).


I have attempted to post this message along with the .pyx file to the pyrex
list, but it would appear there is something wrong with my subscription as
I have received neither my own message not anybody else's since subscribing
:-(

[...]

Your message appeared on the list:

http://lists.copyleft.no/pipermail/p...er/thread.html
John
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.