cygwin and python21.lib: unresolved symbols

Karl M. Syring syring at email.com
Sat Aug 11 22:54:58 EDT 2001


"Les Schaffer" <schaffer at optonline.net> schrieb
> In trying to compile the python extension for cephes using cygwin tools, i
> ran into troubles in the link phase with complaints about missing symbols
of
> the form, for example, PyTuple_Type (_imp__PyTuple_Type).
>
> when i check a variety of python21.dll's using dependency walker, these
> symbols are shown exported. when i check with cygwin's nm:
>
>     nm python21.lib
>
> they are missing. so maybe this is a cygwin problem. they are not ALL
> missing, just some.
>
> has anyone else using cygwin run into these missing symbols?

You need to use the mingw tools version that link with msvcrt.dll, otherwise
you will end up in DLL hell.
Start from the python21.dll:
Extract a python21.def file with nm or dumpbin (caveat: some versions of nm
will say "no symbols"), then
  dlltool  --dllname python21.dll --def python21.def --output-lib
libpython21.a
will give you the proper libpython21.a, works like a charm.

Karl M. Syring




More information about the Python-list mailing list