seeking an example on C extension works in python 3.1.x or above

Dan Stromberg drsalists at gmail.com
Wed Jul 27 03:26:08 CEST 2011


BTW, I believe you need to compile your extension module(s) with the same
compiler that was used to build the Python interpreter - otherwise there
could be calling convention issues.

On Tue, Jul 26, 2011 at 5:58 PM, Dan Stromberg <drsalists at gmail.com> wrote:

>
> You could try looking in the Python sources for examples.
>
> But using Cython is probably easier.
>
>
> On Tue, Jul 26, 2011 at 5:06 PM, <llwaeva at gmail.com> wrote:
>
>> Hello,
>>  I have been searching the example on C extension that works in python
>> 3.1.x ror above for long time. I tried the simple example given in
>> python document or enclosed in python's src (PC folder), doesn't work,
>>
>> undefined reference to  `_imp___Py_NoneStruct'
>>
>> and
>> undefined reference to  `_imp__PyModule_Create2'
>>
>> error caught. For the first one, somewhere it could be fixed by some way
>> mentioned in the faq somewhere. But I don't see any suggestion in the
>> internet or in the mail list about that. Can any one who ever succeed to
>>  compile
>> the any example to extend python (3.1 +) with C API under windows?
>>
>> I am using windows 64bit + VC2010 and gcc  mingw.
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110726/d56750c1/attachment.html>


More information about the Python-list mailing list