473,388 Members | 954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Pyrex problem - Py_NoneStruct

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
3 2273
"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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Kyler Laird | last post by:
I need to submit C/C++ code for a class. (It's not a programming class. The choice of language is inertial. I think that it mostly serves to distract students from the course subject.) I'm...
1
by: Paul Prescod | last post by:
PyCon 2004 Slides on "Extending Python with Pyrex" PDF: http://www.prescod.net/pyrex/ExtendingPythonWithPyrex.pdf PPT: http://www.prescod.net/pyrex/ExtendingPythonWithPyrex.ppt Pycon 2004 Slides...
4
by: Kyler Laird | last post by:
I mentioned earlier that I started using Pyrex because I'm taking a computer vision course that requires all assignments to be submitted as C(++). While I could write C it would hurt me to do so...
6
by: SeeBelow | last post by:
I just read "about Pyrex" at http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/version/Doc/About.html It seems that it is not compiled into machine code, as C would be, and therefore it does...
1
by: Martin Bless | last post by:
Now that I've got my extension building machine using the VC++ Toolkit 2003 up and running I'm keen on using Pyrex (Pyrex-0.9.3, Python-2.4.0). But the definition of the swig_sources() method...
4
by: Carl | last post by:
I have recently started to use Pyrex and am amazed by it's useability. Are there any alternatives to Pyrex? One thing that I haven't figured out is how to embed pure C/C++ source code into...
27
by: Julien Fiore | last post by:
Do you wand to install Pyrex on Windows ? Here is a step-by-step guide explaining: A) how to install Pyrex on Windows XP. B) how to compile a Pyrex module. Julien Fiore, U. of Geneva
11
by: Jim Lewis | last post by:
Has anyone found a good link on exactly how to speed up code using pyrex? I found various info but the focus is usually not on code speedup.
7
by: Jim Lewis | last post by:
I'm trying to move a function into pyrex for speed. The python side needs to pass a list to the pyrex function. Do I need to convert to array or something so pyrex can generate tight code? I'm not...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.