linking the python library

P

Philip Smith

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.

Anyone know why?
 
G

Gerhard Haering

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBmxa2dIO4ozGCH14RAmvxAJ9VdXMPF+ZJ3HJatEUgQBkQuSHELQCeOPBb
qq6cT0Y5wX9uvVWFMDJ+h6Y=
=YGAA
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,211
Messages
2,571,092
Members
47,693
Latest member
david4523

Latest Threads

Top