Problems compiling with python libraries

Nicky White nicky001 at gofree.indigo.ie
Mon Feb 26 04:57:47 EST 2001


Hi,
I am trying to compile some C code which will allow me to call some python
modules from within a C program. The code I'm using is sample code and it
compiles ok. I  cannot get it to link however. It version 1.52 of python
running on Red Hat 6.1. I have all the rpm's installed (python-devel etc.).
The compile line is:
gcc -I/usr/include/python1.5 -L/usr/lib/python1.5/config -lpython1.5 -o
embed embed.c
Functions such as PyImport_ImportModule() , which I call from within the
program , cannot be found by the linker. Anyone know what the right linker
options should be?

Thanks,
Nicky






More information about the Python-list mailing list