ANN: Pyrex 0.3.4

Matthias Baas baas at ira.uka.de
Sun Jul 21 03:49:01 EDT 2002


On Fri, 19 Jul 2002 08:21:30 GMT, "Fredrik Lundh"
<fredrik at pythonware.com> wrote:
>Matthias Baas wrote:
>> I thought you only need that if you import the dll through an
>> import library which Python doesn't do.
>
>nope.  without dllexport (or a DEF file or an exports directive to
>the linker), 

Ah, now I see! I've checked for a def file, but I forgot about the
linker options. I was always using the distutils and indeed, there's a
"/EXPORT:initxtest" given to the linker. Thanks for clearing that one
up.

>the module's init function won't be exported.  if it's
>not exported, Python's PYD loader refuses to load the module.
>
>the correct solution (in 2.2 and earlier) is to use the DL_EXPORT
>macro, which is set to the right thing for whatever platform you're
>using.

For the sake of understanding, I tried to use this macro, but it takes
an argument. What's that argument supposed to be?
I had a look in the Python source and also read about the macro
USE_DL_EXPORT. Do I have to define that myself before including
Python.h (but DL_EXPORT was defined even without defining
USE_DL_EXPORT myself)? Well, whatever I tried, I didn't really manage
to compile the module that way....

- Matthias -




More information about the Python-list mailing list