Creating C modules for Python under Cygwin

Martin v. Löwis loewis at informatik.hu-berlin.de
Sat May 4 13:53:17 EDT 2002


"Richard P. Muller" <rpm at wag.caltech.edu> writes:

> This must work on some level, since people have managed to compile, for
> example, NumPy under Cygwin.
> 
> Am I missing something here or railing against the impossible? Can
> someone give me pointers?

Both: it is impossible to access symbols that are defined in an
executable on Windows - you *must* get all symbols you need from a
library.  So if you have a standalone python.exe, it is impossible to
build extensions for it.

However, if you build the Python library as a DLL, linking against the
python library does *not* incorporate the entire library into the
extension module. So you are either missing the opportunity to build
the library as a DLL, or missing the fact that linking agains a DLL is
"acceptable" in many cases.

HTH,
Martin




More information about the Python-list mailing list