On Thu, 2007-09-13 at 18:05 -0700, Thierry Masson wrote: > Hello, > > I'm trying to use the C API to extend Python. I've looked at various > books and web sites (including the docs at python.org) and I can't get > any of the samples to work. Below is a very minimalist example that > I'm trying to get working and I was wondering if someone could tell me > where I'm going wrong. It's probably something very obvious to those > familiar with this technique. >[snip...] > The setup script builds the library OK, and I've verified that > gtestmodule.so is getting created. But when I try to run a test script > ( test.py, above) that uses the library, I get this error: > > Traceback (most recent call last): > File "test.py", line 2, in ? > import gtestmodule > ImportError: ./gtestmodule.so: undefined symbol: PyBuildValue
Your module C code uses an unknown function by the name of PyBuildValue. The actual name of the function you mean is Py_BuildValue. HTH, -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list