<P>
I'm new to using Pyrex.&nbsp; I need to get a computationally<BR>
intensive function optimized.&nbsp; The platform is Win98,<BR>
Python 2.3.4 (the installable executable as obtained from<BR>
www.python.org).<BR>
<BR>
I'm using gcc 3.2 in -mno-cygwin (mingw) mode, though I<BR>
believe the python.org version is built with MSVC.<BR>
<BR>
I have the following files:<BR>
<BR>
&nbsp; func.c (with a function f())<BR>
&nbsp; pyfunc.pyx (with a function pf() that calls f())<BR>
<BR>
Various web pages indicated that a long dance involving<BR>
dlltool and such utilities would be required.<BR>
<BR>
However, this simple procedure seems to work for me:<BR>
<BR>
&nbsp; gcc -mno-cygwin -O3 -c func.c -o func.o<BR>
<BR>
&nbsp; pyrexc -o pyfunc.c pyfunc.pyx<BR>
<BR>
&nbsp; gcc -mno-cygwin -Ic:/python23/include -O3 -c \<BR>
&nbsp; &nbsp; &nbsp; pyfunc.c -o pyfunc.o<BR>
<BR>
&nbsp; gcc -mno-cygwin -O3 -shared func.o pyfunc.o \<BR>
&nbsp; &nbsp; &nbsp; c:/windows/system/python23.dll -o pyfunc.pyd<BR>
<BR>
Importing pyfunc and calling pyfunc.pf() from Python<BR>
give the expected results.<BR>
<BR>
Is it supposed to be so straightforward?&nbsp; Is this<BR>
procedure reliable?&nbsp; Will it work for more complex<BR>
functions?&nbsp; Will the resulting .pyd file work on other<BR>
MS Windows versions?<BR>
<BR>
Any input would be useful.<BR>
<BR>
Thanks,<BR>
<BR>
jjs<BR>

</P>
<br><br>
<A target="_blank" HREF="http://clients.rediff.com/signature/track_sig.asp"><IMG SRC="http://ads.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail.com/inbox.htm@Bottom" BORDER=0 VSPACE=0 HSPACE=0></a>