On Dec 7, 11:44 pm, DavidM <[EMAIL PROTECTED]> wrote: > On Fri, 07 Dec 2007 00:53:15 -0800, Graham Dumpleton wrote: > > Are you actually linking your C program against the Python library? > > Yes. Refer OP: > > >> I'm embedding python in a C prog which is built as a linux shared lib. > >> The prog is linked against libpython, and on startup, it calls > >> Py_Initialize().
What was the compiler link line you used for your program/shared library then? Have you confirmed using 'ldd' command that your program/shared library do actually link against libpython? Your original description is confusing. You say your program is built as a shared library. Can you properly explain the full process you are using to build your code and if you are producing a shared library for your program how then is that shared library being used with an actual executable? Be specific about where the program main() is located? Some platforms don't necessarily find symbols from shared library 'A' linked against a program executable if the main() is actually obtained from a shared library 'B" linked to the same program and where the symbols required from 'A' are only used in 'B'. What is required is to link library 'A' against library 'B'. Graham -- http://mail.python.org/mailman/listinfo/python-list