Embedding python: GCC gives errors of "undefined reference" to Py_* functions.
Shuaib
aries.shuaib at gmail.com
Sat Aug 19 15:47:40 EDT 2006
OK, I am not ashamed to admit that I am ashamed as I didn't search the
group for my problem before posting it yet again. The solution was
right there.
I have link in my libpython2.4.so while compiling.
$gcc -I/usr/include/python2.4/ -lpython2.4 -o foo foo.c
Shuaib wrote:
> Hey!
>
> I am trying to embedd python into a C programe of mine. But when I try
> to compile the C code, gcc gives errors like "undefined reference to
> `Py_Finalize'" and the same kind for all the other functions. I have
> incuded "Python.h".
>
> Any idea what might be wrong?
>
> Thanks.
More information about the Python-list
mailing list