Embedding python: GCC gives errors of "undefined reference" to Py_* functions.

S

Shuaib

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.
 
S

Shuaib

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
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top