[Pyrex] Making a dll on windows
Josiah Carlson
jcarlson at uci.edu
Sat Jul 2 19:20:01 CEST 2005
Nicolas Pernetty <nicopernetty at yahoo.fr> wrote:
> Hello,
>
> First question : I haven't found how to search the mailing list, it
> appears that you can only browser by month. Is it really impossible ?
Prefix your google searches with "site:lists.copyleft.no pyrex" (without
the double quotes).
> Second one : I'm happily using Pyrex on unix systems, but I would also
> like to use it on Windows NT and XP. How can I do it ?
I use GCC 2.95 on linux and MSVC 6 on Windows (I'm using Python 2.3, so
both of those compilers match the platform Python distributions), so it
is at least possible.
> I've tried to use the .c generated by Pyrex from my .pyx file on unix
> and compile it on windows , but I got a lot of errors messages.
> So is the .c generated by Pyrex is really portable across different
> platforms ?
Pyrex seems to produce identical source outputs, at least in all of the
comparisons I've done.
> On windows I'm using the Python enthought distribution with Dev-C++ as a
> C IDE and compiler.
The enthought people don't seem to be distributing that version
to the public quite yet.
It could be that your compiler, mingw or cygwin gcc (Dev-C++ isn't
itself a compiler), doesn't know enough to properly link against Python
sources. Whether that is because you don't have your include paths
correct, or because you haven't extracted the symbol table (in the mingw
case), I don't know.
You should consider installing Pyrex on Windows via distutils, and use
the standard setup.py method for compiling your modules. It has kept me
going for the last few months without issue. With minor work, you can
even get automatic recompilation on module load.
- Josiah
More information about the Pyrex
mailing list