linking the python library

Gerhard Haering gh at ghaering.de
Wed Nov 17 04:15:34 EST 2004


On Wed, Nov 17, 2004 at 09:02:49AM +0000, Philip Smith wrote:
> I have tried compiling extension modules for python using pyrex and
> swig and both mingw and sygwin gcc under windows32
> 
> Unfortunately whatever I try the compilers fail to link python23.lib
> as specified under gcc -L option - I just get a string of "undefined
> references" to Python builtins.

You cannot link against python23.lib with gcc. Instead you must create
a libpython23.a and copy it to the place where python23.lib was.

See
http://docs.python.org/inst/tweak-flags.html#SECTION000622000000000000000

-- Gerhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20041117/fb450880/attachment.sig>


More information about the Python-list mailing list